You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into an interesting issue the other day while making my crate compatible with no_std.
Our cargo.toml setup looked roughly like this:
# --snip--
[features]
std = ["glam/std"]
[dependencies]
glam = { version = "0.29", default-features = false, features = ["libm"] }
The goal was to use std features whenever they were available and fall back on libm when they weren't. Benchmarks showed, however, that even on std-enabled compilations libm functionality was being preferred. I believe this is unintended behavior, but I wanted to confirm before submitting a PR.
This is intended behaviour. People may want to enable libm independent of whether std is being used. For example libm will be more deterministic across platforms because the implementation is consistent.
I ran into an interesting issue the other day while making my crate compatible with no_std.
Our cargo.toml setup looked roughly like this:
The goal was to use std features whenever they were available and fall back on libm when they weren't. Benchmarks showed, however, that even on std-enabled compilations libm functionality was being preferred. I believe this is unintended behavior, but I wanted to confirm before submitting a PR.
For my crate, I ended up just doing:
The text was updated successfully, but these errors were encountered: