Closed XAMPPRocky closed 1 year ago
Sure! I've never actually done a non_std
crate before so would be cool to try.
Is there more to it than using the types from core
and alloc
?
Is there more to it than using the types from core and alloc?
For libraries nope, all you do is use those types, and set #![no_std]
in the root. For applications it's more complicated as you need to specify your main/start function (of course you can use no_std libraries in std applications no problem).
If you want to add std
support for select types, you should typically have the crate be #[no_std]
by default, and provide a std
feature (rather than opposite, having it default to std
and then enabling a no_std
feature.), as that makes default-features = false
behave intuitively.
I was scrolling through the org github and just happened to see this. 😄 I was interested in trying it out in one of my project, and I was wondering if you'd consider adding
#![no_std]
support? As far as I can tell nearly all of the crate is implemented with types incore
andalloc
, having it available without std would allow this to be used by a lot more lower level libraries such as codec/serialisation frameworks.