paholg / dimensioned

Compile-time dimensional analysis for various unit systems using Rust's type system.
https://crates.io/crates/dimensioned
MIT License
300 stars 23 forks source link

Added support of use with `no_std` on Rust's `stable` channel #60

Closed regexident closed 5 years ago

regexident commented 5 years ago

Moved impls of Root and Sqrt traits, as well as any unit system conversions using them, behind an additional nightly feature flag.

This allows one to use dimensioned on stable with no_std as long as you don't try to convert between one unit system and another. I'd reckon that most people pick one system and then stick to it anyway.

I'd like to use dimensioned in a project that targets embedded environments, but make use of the fact that no_std by itself doesn't require nightly any more.

To use unit system conversions on no_std one now has to pass an additional --features=nightly (in addition to --no-default-features) to cargo build.

regexident commented 5 years ago

Any chance to get this merged, @paholg?

regexident commented 5 years ago

Knock, knock?

regexident commented 5 years ago

paholg commented 5 years ago

It looks like our use of rand is broken with this change. This won't deploy to crates until that's fixed. I'm not sure when I will have time to work on it, but hopefully within the next couple weeks.