Cargo Features
[dependencies]
half = { version = "2.3.1", default-features = false, features = ["std", "use-intrinsics", "alloc", "rand_distr", "bytemuck", "serde", "num-traits", "zerocopy"] }
- default = std
-
The
std
feature is set by default wheneverhalf
is added without
somewhere in the dependency tree.default-features = false - std default = alloc
-
Affects
slice::HalfFloatSliceExt.to_f32_vec
… - use-intrinsics
-
Deprecated
- alloc std
-
Affects
half::vec
,slice::HalfFloatSliceExt.to_f64_vec
,slice::HalfFloatSliceExt.to_f32_vec
… - rand_distr
-
Enables rand and rand_distr
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features.
- bytemuck implicit feature
-
With derive
- serde implicit feature
-
With derive
- num-traits implicit feature
-
With libm
- zerocopy implicit feature
-
Enables zerocopy ^0.6.0