Cargo Features
bytemuck has no features set by default.
[dependencies]
bytemuck = { version = "1.14.0", features = ["derive", "extern_crate_alloc", "extern_crate_std", "zeroable_atomics", "align_offset", "min_const_generics", "wasm_simd", "aarch64_simd", "must_cast", "unsound_ptr_pod_impl", "nightly_portable_simd", "nightly_stdsimd", "nightly_docs"] }
- derive = bytemuck_derive
-
In v2 we'll fix these names to be more "normal".
- extern_crate_alloc extern_crate_std?
-
Affects
bytemuck::allocation
… - extern_crate_std = extern_crate_alloc
- zeroable_maybe_uninit zeroable_atomics
- align_offset
-
All MSRV notes below are GUIDELINES and future versions may require even more MSRV on any feature.
MSRV 1.36: Use
align_offset
method instead of casting tousize
to check alignment of pointers, this may improve codegen in some cases (but it has never been formally benchmarked!) - min_const_generics
-
MSRV 1.51: support arrays via min_const_generics
- wasm_simd
-
MSRV 1.54.0: support wasm simd types
- aarch64_simd
-
MSRV 1.59.0: support aarch64 simd types
- must_cast
-
MSRV 1.57.0: support the
must
module. - unsound_ptr_pod_impl
-
Do not use if you can avoid it, because this is unsound!!!!
- nightly_portable_simd
-
NOT SEMVER SUPPORTED! TEMPORARY ONLY!
- nightly_stdsimd
- nightly_docs
-
Improved documentation using the nightly toolchain
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features.