Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency on std is too strong #164

Closed
stephanemagnenat opened this issue Dec 19, 2024 · 2 comments
Closed

Dependency on std is too strong #164

stephanemagnenat opened this issue Dec 19, 2024 · 2 comments

Comments

@stephanemagnenat
Copy link
Contributor

stephanemagnenat commented Dec 19, 2024

Currently, some features depend on std, such as the re-exporting of num_trait's Float (from here):

#[cfg(feature = "std")]
pub use num_traits::{Float, Pow};

However, num_trait has the ability to export these using libm even under no_std (from here):

#[cfg(any(feature = "std", feature = "libm"))]
pub trait Float: Num + Copy + NumCast + PartialOrd + Neg<Output = Self> {
...

I think that it would be good for ordered-float to do the same, enabling a wider use of its feature set under no_std.

Does the maintainer agree?

@stephanemagnenat stephanemagnenat changed the title Std dependency is too strong Dependency on std is too strong Dec 19, 2024
@stephanemagnenat
Copy link
Contributor Author

Woah that was fast, thank you very much! :-)

@stephanemagnenat
Copy link
Contributor Author

Fyi I document this addition in #165.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant