Cargo Features

[dependencies]
glam = { version = "0.24.2", default-features = false, features = ["std", "debug-glam-assert", "glam-assert", "scalar-math", "cuda", "fast-math", "core-simd", "approx", "bytemuck", "mint", "rand", "serde", "rkyv", "bytecheck", "libm"] }
default = std

The std feature is set by default whenever glam is added without default-features = false somewhere in the dependency tree.

std default

enable support for the standard library

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.

core-simd

experimental nightly portable-simd support

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features.

approx implicit feature

Affects features::impl_approx

bytemuck implicit feature

Affects features::impl_bytemuck

mint implicit feature

Affects features::impl_mint

rand implicit feature

Affects features::impl_rand

serde implicit feature

Affects features::impl_serde

rkyv implicit feature

Affects features::impl_rkyv

bytecheck implicit feature

Enables bytecheck ^0.6

libm implicit feature