Cargo Features
[dependencies]
glam = { version = "0.33.1", default-features = false, features = ["std", "f64", "isize", "usize", "i64", "u64", "i32", "u32", "i16", "u16", "i8", "u8", "float-types", "integer-types", "size-types", "all-types", "debug-glam-assert", "glam-assert", "scalar-math", "cuda", "fast-math", "serde", "core-simd", "bytecheck", "zerocopy", "libm", "nostd-libm", "approx", "bytemuck", "mint", "rand", "speedy", "encase", "arbitrary"] }
- default = all-types, std
-
These default features are set whenever
glamis added withoutsomewhere in the dependency tree.default-features = false - std default
-
enable support for the standard library
- f64 float-types?
-
Affects
glam::f64… - isize size-types?
-
Affects
glam::isize… - usize size-types?
-
Affects
glam::usize… - i64 integer-types?
-
Affects
glam::i64… - u64 integer-types?
-
Affects
glam::u64… - i32 integer-types?
-
Affects
glam::i32… - u32 integer-types?
-
Affects
glam::u32… - i16 integer-types?
-
Affects
glam::i16… - u16 integer-types?
-
Affects
glam::u16… - i8 integer-types?
-
Affects
glam::i8… - u8 integer-types?
-
Affects
glam::u8… - float-types all-types = f64
- integer-types all-types = i16, i32, i64, i8, u16, u32, u64, u8
- size-types all-types = isize, usize
- all-types default = float-types, integer-types, size-types
- debug-glam-assert
-
enable additional glam checks if debug assertions are enabled
- glam-assert
-
always enable additional glam checks
- scalar-math
-
this is primarily for testing the fallback implementation
- cuda
-
align types to match CUDA requirements
- fast-math
-
Enables platform specific optimizations that might speed-up certain operations.
This will cause APIs to output different results depending on the platform used and will likely break cross-platform determinism.
This should NOT be enabled by intermediate libraries, deferring the decision to the end binary build instead. - serde
-
Enables serde_core
Affects
features::impl_serde… - core-simd
-
experimental nightly portable-simd support
Enables nightly_portable_simd of optional bytemuck
- bytecheck
-
"alloc" is needed to support to_bytes()/deserialize() in tests.
- zerocopy
-
Enables zerocopy and zerocopy-derive
Affects
features::impl_zerocopy… - libm
-
enables libm and prefers it over std
Enables libm
- nostd-libm
-
enables libm but will prefer std if available
Enables libm
Features from optional dependencies
In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.
- approx implicit feature
-
Affects
features::impl_approx… - bytemuck implicit feature
-
Enables bytemuck
bytemuck:
A crate for mucking around with piles of bytes
Affects
features::impl_bytemuck… - mint implicit feature
-
Affects
features::impl_mint… - rand implicit feature
-
Enables rand
rand:
Random number generators and other randomness functionality
Affects
features::impl_rand… - rkyv bytecheck?
-
Affects
features::impl_rkyv… - speedy implicit feature
-
Affects
features::impl_speedy… - encase implicit feature
-
Affects
features::impl_encase… - arbitrary implicit feature
-
Enables arbitrary
arbitrary:
The trait for generating structured data from unstructured data
Affects
features::impl_arbitrary…