3 ms·
Can you clarify what youre referring to with "decided to implement it in the compiler instead", be it from this blog post or elsewhere? Clearly you need corout
by aidanhs 8y ago
Can you clarify what youre referring to with "decided to implement it in the compiler instead", be it from this blog post or elsewhere?
Clearly you need coroutines in the compiler, and the way Rust treats ownership means pinning is needed in some way (I've not been following closely so don't know if this is in libstd or a language-level feature), but the rest (according to this post) seems to be going in libstd so you can write your own if you want.
- steveklabnik 8y agoPinning is almost entirely a library feature; it does use the unstable “auto traits” functionality of the language, so it’s a bit special in that regard. But it’s provided by the standard library.
- dom96 8y ago> Can you clarify what youre referring to with "decided to implement it in the compiler instead" I'm referring specifically to the async/await syntax. Coroutines probably need to be implemented in the compiler, sure, but the actual async/await can be implemented with metaprogramming.