Skip to content

Disable default features for glam #1510

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

Jondolf
Copy link
Contributor

@Jondolf Jondolf commented Apr 17, 2025

Objective

Currently, the convert-glamXYZ features add glam as a dependency with default features enabled. This unconditionally enables the std feature in glam, making it impossible to use nalgebra and glam interoperatively with the type conversions in no_std environments.

Solution

Disable default features from the glam dependencies. To make CI pass, std is still used if it's enabled for nalgebra.

Note that I also bumped the rustc version to 1.81.0 here since CI was failing because of it (unrelated to this PR).

Comment on lines +26 to +49
std = [
"matrixmultiply",
"num-traits/std",
"num-complex/std",
"num-rational/std",
"approx/std",
"simba/std",
"glam014?/std",
"glam015?/std",
"glam016?/std",
"glam017?/std",
"glam018?/std",
"glam019?/std",
"glam020?/std",
"glam021?/std",
"glam022?/std",
"glam023?/std",
"glam024?/std",
"glam025?/std",
"glam027?/std",
"glam028?/std",
"glam029?/std",
"glam030?/std",
]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit nasty :/ not sure if there's a better way?

Jondolf added 3 commits April 17, 2025 15:40
The intended approach is to use `serde-serialize-no-std` if serde is needed in `no_std` environments.
@Ralith
Copy link
Collaborator

Ralith commented Apr 17, 2025

Seems like a good idea to me, but this PR seems to contain unrelated changes, e.g. to the rustc version used for trybuild tests.

@Jondolf
Copy link
Contributor Author

Jondolf commented Apr 19, 2025

Yeah that's to make CI pass. Won't be needed if we first merge #1505 or some other PR that bumps the version

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

Successfully merging this pull request may close these issues.

2 participants