Skip to content

Commit 947f0b7

Browse files
committed
fix(cuda_std): pin glam to "0.30" to match the rest of the workspace
cuda_std declared its glam dependency with an unbounded lower bound and no upper cap: glam = { version = ">=0.22", default-features = false, features = [...] } With default-features = false, this is a latent breakage: glam's "Type features" change (PR #727, shipped in 0.33) gated the vector types behind cargo features. glam keeps `all-types` in its `default`, so ordinary consumers see no change -- but anyone who disables default features loses the integer/size/f64 types unless they re-enable them. cuda_std relies on those gated types: - glam::UVec2 / UVec3 (u32) in src/thread.rs - glam::USizeVec2 / USizeVec3 (size) in src/rt/mod.rs - `pub use glam;` re-exports the whole crate to kernel authors So on glam >=0.33 with defaults off, cuda_std fails to compile (e.g. cannot find glam::UVec2). The unbounded ">=0.22" let a fresh resolve float straight across the 0.32 -> 0.33 break. Why it wasn't already broken in-tree: the other glam consumers in this workspace (cust, cust_core, optix) all pin glam = "0.30", which unifies the dependency graph to 0.30.9 -- a version that predates the type gating, so all types are present regardless of default-features. The bug only bites a *standalone* consumer of cuda_std, where nothing else caps glam. Fix: pin cuda_std to glam = "0.30", matching the other three crates. This caps the bound, keeps the whole workspace on one tested version (0.30.9; Cargo.lock unchanged), and needs no type-feature re-enabling because 0.30 does not gate types (and `all-types` does not exist there). Behavior is preserved. Follow-up (separate change): hoist glam into [workspace.dependencies] so its version is defined once and cannot drift across crates again -- this drift is exactly what allowed cuda_std to diverge from the others.
1 parent 103a8d5 commit 947f0b7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crates/cuda_std/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repository = "https://github.com/Rust-GPU/rust-cuda"
88
readme = "../../README.md"
99

1010
[dependencies]
11-
glam = { version = ">=0.22", default-features = false, features = ["libm", "cuda", "bytemuck"] }
11+
glam = { version = "0.30", default-features = false, features = ["libm", "cuda", "bytemuck"] }
1212
vek = { version = "0.17.1", default-features = false, features = ["libm"] }
1313
cuda_std_macros = { version = "0.2", path = "../cuda_std_macros" }
1414
half = "2.4.1"

0 commit comments

Comments
 (0)