NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io
crates.io, #649 most downloaded on crates.io
derive proc-macros for `bytemuck`
Latest stable
1.12.1
Last release 2 months ago
11 Sep 2026
Release timing varies
gaps range from 8 days to 9 months
Most releases are documented
notes for 18 of 25 stable releases
1 version withdrawn
withdrawn after publishing
6 years old
28 releases · first in 2020
Drag across the ruler to compare, or tap a release to open it.
chore: Release bytemuck_derive version 1.12.1
chore: Release bytemuck_derive version 1.12.1
bytemuck_derive version because of a regression in
how it handled align(N) attributes.chore: Release bytemuck_derive version 1.12.0
chore: Release bytemuck_derive version 1.12.0
bytemuck_derive
dependency, which is in turn caused by a mixup in the minimum version of syn
that bytemuck_derive uses. See Issue
122. There's not any
specific "new" API as you might normally expect from a minor version bump.Display,
which the error types normally support, except on SPIR-V targets (which run on
the GPU and don't have text formatting).Your coding agent can read these notes before it upgrades. Set up the MCP server →
chore: Release bytemuck_derive version 1.11.0
chore: Release bytemuck_derive version 1.11.0
wrap_box and peel_box
to the TransparentWrapperAlloc trait. Default impls of these functions are
provided, and (as usual with the transparent trait stuff) you should not override
the default versions.chore: Release bytemuck_derive version 1.10.2
chore: Release bytemuck_derive version 1.10.2
Nothing published for this version
TheEdward162 added the ZeroableInOption and PodInOption traits. These are for types that are Zeroable or Pod *when in an option*, but not on their own
ZeroableInOption
and PodInOption traits. These are for types that are Zeroable or Pod
when in an option, but not on their own. We provide impls for the various
"NonZeroINTEGER" types in core, and if you need to newtype a NonZero value
then you can impl these traits when you use repr(transparent).Nothing published for this version
Nothing published for this version
Bumped the minimum bytemuck_derive dependency version from 1.0 to 1.1. The fact that bytemuck and bytemuck_derive are separate crates at all is an unf
bytemuck_derive dependency version from 1.0 to 1.1.
The fact that bytemuck and bytemuck_derive are separate crates at all is
an unfortunate technical limit of current Rust, woe and calamity.fu5ha added the NoUninit, AnyBitPattern, and CheckedBitPattern traits. This allows for a more fine-grained level of detail in what casting operations
NoUninit, AnyBitPattern, and
CheckedBitPattern traits. This allows for a more fine-grained level of
detail in what casting operations are allowed for a type. Types that already
implement Zeroable and Pod will have a blanket impl for these new traits.
This is a "preview" of the direction that the crate will probably go in the
eventual 2.0 version. We're still waiting on Project Safe
Transmute for an actual
2.0 version of the crate, but until then please enjoy this preview.union types in the derive macros. I
still don't know how any of the proc-macro stuff works at all, so please
direct questions to her.Nothing published for this version
try_pod_read_unaligned and pod_read_unaligned let you go from &[u8] to T:Pod without worrying about alignment.
try_pod_read_unaligned and pod_read_unaligned let you go from &[u8] to
T:Pod without worrying about alignment.Soundness Fix: The wrap/peel methods for owned value conversion, added to TransparentWrapper in 1.6, can cause a double-drop if used with types that i
TransparentWrapper in 1.6, can cause a double-drop if used with types that
impl Drop. The fix was simply to add a ManuallyDrop layer around the value
before doing the transmute_copy that is used to wrap/peel. While this fix
could technically be backported to the 1.6 series, since 1.7 is semver
compatible anyway the 1.6 series has simply been yanked.version of Bytemuck has a *Soundness-Required Breaking Change*. This is "allowed" under Rust's backwards-compatibility guidelines, but it's still anno…
Pod. More
specifically, ptr as usize is not the same operation as calling
transmute::<_, usize>(ptr).Pod impls for *const T,
*mut T, and Option<NonNull<T> are now gated behind the
unsound_ptr_pod_impl feature, which is off by default.DJMcNab did a fix so that the crate can build for SPIR-V PR 67
The TransparentWrapper trait now has more methods. More ways to wrap, and now you can "peel" too! Note that we don't call it "unwrap" because that nam
TransparentWrapper trait now has more methods. More ways to wrap, and
now you can "peel" too! Note that we don't call it "unwrap" because that name
is too strongly associated with the Option/Result methods.
Thanks to LU15W1R7H for doing
PR 58min_const_generics crate feature.
zakarumych got the work started in
PR 59,
and chorman0773 finished off the task in
PR 63Added pod_collect_to_vec, which will gather a slice into a vec, allowing you to change the pod type while also safely ignoring alignment. PR 50
pod_collect_to_vec, which will gather a slice into a vec,
allowing you to change the pod type while also safely ignoring alignment.
PR 50thomcc fixed up the CI and patched over a soundness hole in offset_of!. PR 38
icewind1991 has contributed the proc-macros for deriving impls of Pod, TransparentWrapper, Zeroable!! Everyone has been waiting for this one folks! It
Pod, TransparentWrapper, Zeroable!! Everyone has
been waiting for this one folks! It's a big deal. Just enable the derive
cargo feature and then you'll be able to derive the traits on your types. It
generates all the appropriate tests for you.zeroable_maybe_uninit feature now adds a Zeroable impl to the
MaybeUninit type. This is only behind a feature flag because MaybeUninit
didn't exist back in 1.34.0 (the minimum rust version of bytemuck).Had a bug because the CI was messed up! It wasn't soundness related, because it prevented the crate from building entirely if the extern_crate_alloc f
extern_crate_alloc
feature was used. Still, this is yanked, sorry.Nothing published for this version
A fully sound offset_of! macro #10
offset_of! macro
#10Contiguous trait for when you've got enums with declared values
all in a row #12TransparentWrapper marker trait for when you want to more clearly
enable adding and removing a wrapper struct to its inner value
#15Nothing published for this version
SimonSapin added from_bytes, from_bytes_mut, try_from_bytes, and try_from_bytes_mut (PR Link)
from_bytes,
from_bytes_mut, try_from_bytes, and try_from_bytes_mut (PR
Link)Added much more proper documentation.
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.