I'm building a library to be used on a no_std
platform which allows you to do some common network-related IO, such as making HTTP requests or reading from/writing to Websockets.
Now, I would like this library to be a well-behaved citizen so that it can be easily included in other no_std
applications. I hence want to package the library by implementing reasonable traits etc. The library would allow me to not have to use alloc
, so supporting non-alloc
no_std
would be ideal.
These are the options I have looked at:
embedded_hal
andnb
: These crates are really low level (no generic traits likeRead
andWrite
or anything higher level) and the async model doesn't seem to be compatible withasync/await
genio
/core_io
/...: These don't support async IO at all.embrio
: Seems interesting but it seems like using it would tie me to one specific environment, making the library less portable.tokio
v0.2.x: I would love to use it but there is nono_std
support at all.futures::io
v0.3.x: Again, would love to use it but there is nono_std
support.
Which async IO abstraction should I use in a no_std environment? If there is no good option right now, which one should I bet on/help out with for the future?