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
Using the library in a project fails to compile if the glam feature is enabled, with errors of the form "error[E0599]: no function or associated item named div_euclid found for type f64 in the current scope", and so on for all the other std math functions
The most likely culprit is that the cargo configuration for this library uses
glam = { version = "^0.27", default-features = false, features = ["mint"], optional = true }
Since no default features are used, std is not used as its the only default feature. However, if std is not used, its necessary for glam to use the libm feature instead to provide the math functions, which is not provided
This doesn't seem to be caught in testing because the testing configures
and therefore pulls in the standard library for glam, and wouldn't raise the issue.
I'm not very familiar with cargo so I don't know much about enabling features conditionally, but somehow the solution would be that if std is enabled for this crate, its also passed in for glam, and if not, glam/libm is requested.
Steps to reproduce:
cargo init some_proj
cd some_proj
cargo add crevice -F glam
cargo run
Will fail to compile
The text was updated successfully, but these errors were encountered:
Using the library in a project fails to compile if the glam feature is enabled, with errors of the form "error[E0599]: no function or associated item named
div_euclid
found for typef64
in the current scope", and so on for all the other std math functionsThe most likely culprit is that the cargo configuration for this library uses
Since no default features are used, std is not used as its the only default feature. However, if std is not used, its necessary for glam to use the libm feature instead to provide the math functions, which is not provided
This doesn't seem to be caught in testing because the testing configures
and therefore pulls in the standard library for glam, and wouldn't raise the issue.
I'm not very familiar with cargo so I don't know much about enabling features conditionally, but somehow the solution would be that if std is enabled for this crate, its also passed in for glam, and if not, glam/libm is requested.
Steps to reproduce:
Will fail to compile
The text was updated successfully, but these errors were encountered: