#futures #async #macro #await #proc-macro #future #async-await

archived nightly macro futures-await-async-macro

Definition of the #[async] macro for the futures-await crate as well as a few other assorted macros

6 releases

Uses old Rust 2015

0.2.0-alpha Mar 8, 2018
0.1.4 May 25, 2018
0.1.2 Apr 11, 2018
0.1.1 Nov 19, 2017
0.1.0 Oct 28, 2017
Download history 61/week @ 2023-07-30 112/week @ 2023-08-06 144/week @ 2023-08-13 66/week @ 2023-08-20 60/week @ 2023-08-27 115/week @ 2023-09-03 100/week @ 2023-09-10 88/week @ 2023-09-17 36/week @ 2023-09-24 72/week @ 2023-10-01 92/week @ 2023-10-08 123/week @ 2023-10-15 134/week @ 2023-10-22 126/week @ 2023-10-29 135/week @ 2023-11-05 83/week @ 2023-11-12

493 downloads per month
Used in futures-await

MIT/Apache

27KB
569 lines

Procedural macro for the #[async] attribute.

This crate is an implementation of the #[async] attribute as a procedural macro. This is nightly-only for now as it's using the unstable features of procedural macros. Furthermore it's generating code that's using a new keyword, yield, and a new construct, generators, both of which are also unstable.

Currently this crate depends on syn and quote to do all the heavy lifting, this is just a very small shim around creating a closure/future out of a generator.

Dependencies

~1.5MB
~43K SLoC