BoxDragon / kolor

Color space conversion math made simple
38 stars 7 forks source link

`std` can't be used with `glam` feature disabled (and small build-break with `glam` disabled) #8

Closed kettle11 closed 2 years ago

kettle11 commented 2 years ago

Right now if the std feature is enabled then glam gets enabled due to this line in the cargo.toml:

[features]
std = ["glam/std"]

I'm not sure how best to fix this. If this feature were stable it could be used: https://doc.rust-lang.org/cargo/reference/unstable.html#weak-dependency-features (https://github.com/rust-lang/cargo/issues/8832)


Additionally for kolor to build with glam disabled this line needs to be changed to prepend super: https://github.com/BoxDragon/kolor/blob/a66d17cf7eee04c54443b3a2e1e1cc98a5151808/kolor/src/details/math.rs#L116

Like this:

impl super::Cuberoot for Vec3 {
kabergstrom commented 2 years ago

Oh, tricky! Looks like the feature you link is being stabilized. Let's wait for that :)