From 947f0b72d58d91cd8ddac77cec0ece91915257ff Mon Sep 17 00:00:00 2001 From: Samuel Laferriere <9342524+samlaf@users.noreply.github.com> Date: Fri, 26 Jun 2026 22:51:55 +0800 Subject: [PATCH] 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. --- crates/cuda_std/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/cuda_std/Cargo.toml b/crates/cuda_std/Cargo.toml index dfbfcb40..6d2e04a6 100644 --- a/crates/cuda_std/Cargo.toml +++ b/crates/cuda_std/Cargo.toml @@ -8,7 +8,7 @@ repository = "https://github.com/Rust-GPU/rust-cuda" readme = "../../README.md" [dependencies] -glam = { version = ">=0.22", default-features = false, features = ["libm", "cuda", "bytemuck"] } +glam = { version = "0.30", default-features = false, features = ["libm", "cuda", "bytemuck"] } vek = { version = "0.17.1", default-features = false, features = ["libm"] } cuda_std_macros = { version = "0.2", path = "../cuda_std_macros" } half = "2.4.1"