genawaiter
genawaiter copied to clipboard
add `no_std` compatibility and remove `Coroutine` trait
I'd like to use this crate in an embedded environment, so I've gone through and replaced all referenced to std with core except for alloc::sync::Arc which is required for the rc and sync engines and std::sync::Mutex which is required for the sync engine alone.
Also, now that nightly's Generator has been updated to take an argument, the custom Coroutine trait isn't required; I've removed it in favor of the base Generator trait.
(These could be split into single-purpose PRs easily if that would be preferable.)
I'd like to consider this library for a project of mine, and no_std would help for my needs. It would be cool if Arc and Mutex were not needed, but I think that's probably asking too much.
@cameronelliott You don't need Arc or Mutex if you use the genawaiter::stack engine!
Hey, I'm interested in this PR, what prevents it to be merged? That would be so cool to have stable generators in my firmware code!