diff --git a/Cargo.toml b/Cargo.toml index e6d77a0..bc0587d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,16 +19,20 @@ extern_crate_std = ["extern_crate_alloc"] zeroable_maybe_uninit = [] zeroable_atomics = [] -# Causes MSRV 1.36, use `align_offset` method instead of casting to `usize` to -# check alignment of pointers, this *may* improve codegen in some cases (but it -# has never been formally benchmarked!) +# 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 to `usize` to check +# alignment of pointers, this *may* improve codegen in some cases (but it has +# never been formally benchmarked!) align_offset = [] -min_const_generics = [] # Causes MSRV 1.51 +min_const_generics = [] # MSRV 1.51: support arrays via min_const_generics -wasm_simd = [] # Until >= 1.54.0 is MSRV this is an off-by-default feature. -must_cast = [] # Until >= 1.57.0 is MSRV this is an off-by-default feature. -aarch64_simd = [] # Until >= 1.59.0 is MSRV this is an off-by-default feature. +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. # Do not use if you can avoid it, because this is **unsound**!!!! unsound_ptr_pod_impl = [] diff --git a/changelog.md b/changelog.md index 9a8981b..acc15d2 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,19 @@ # `bytemuck` changelog +## 1.14 + +* `write_zeroes` and `fill_zeroes` functions: Writes (to one) or fills (a slice) + zero bytes to all bytes covered by the provided reference. If your type has + padding, this will even zero out the padding bytes. +* `align_offset` feature: causes pointer alignment checks to use the + `align_offset` pointer method rather than as-casting the pointer to `usize`. + This *may* improve codegen, if the compiler would have otherwise thought that + the pointer address escaped. No formal benchmarks have been done either way. +* `must_cast` feature: Adds `must_*` family of functions. These functions will + fail to compile if the cast requested can't be statically known to succeed. + The error messages can be kinda bad when this happens, but eliminating the + possibility of a runtime error might be worth it to you. + ## 1.13.1 * Remove the requirement for the *source* data type to be `AnyBitPattern` on