genawaiter icon indicating copy to clipboard operation
genawaiter copied to clipboard

add `no_std` compatibility and remove `Coroutine` trait

Open mrnerdhair opened this issue 3 years ago • 3 comments
trafficstars

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.)

mrnerdhair avatar Jun 24 '22 07:06 mrnerdhair

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 avatar Nov 16 '22 09:11 cameronelliott

@cameronelliott You don't need Arc or Mutex if you use the genawaiter::stack engine!

mrnerdhair avatar Nov 17 '22 04:11 mrnerdhair

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!

real-felix avatar Feb 20 '23 11:02 real-felix