andersk / enum_primitive-rs

Macro to generate num::FromPrimitive instances for enum that works in Rust 1.0
MIT License
63 stars 22 forks source link

Support for no_std / libcore #9

Open kevinaboos opened 7 years ago

kevinaboos commented 7 years ago

This crate is ideal for use within an OS (to easily use C-style enums and defines), but it seems to require the std crate. Is there an option like a no_std feature to disable the std library and instead use just libcore? If not, I'd like to make that a feature request.

If that's not possible, my apologies, I am relatively new to Rust.

skull-squadron commented 7 years ago

num-traits is moving to no_std too, so it would be a good idea. I'm also trying to use it in a no_std project.

MrBuddyCasino commented 6 years ago

Conjuring enums from ints is something thats often needed in embedded projects. No-Std would be great!

repi commented 6 years ago

Agreed, just ran into this today as well and was surprised that enumprimitive didn't support no_std