NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io
crates.io, #1768 most downloaded on crates.io
This crate provides macros to generate bitfield-like struct.
Latest stable
0.20.0
Last release 1 months ago
13 Oct 2026
Release timing varies
gaps range from 4 weeks to 1.7 years
Some releases are documented
notes for 15 of 35 stable releases
1 version withdrawn
withdrawn after publishing
12 years old
36 releases · first in 2014
Drag across the ruler to compare, or tap a release to open it.
The inner field generated by bitfield! is now private by default. Add pub inside the newtype declaration (for example, pub struct Flags(pub u32);) to
bitfield! is now private by default. Add pub inside the newtype declaration
(for example, pub struct Flags(pub u32);) to retain public access. Restricted field visibility is also supported.debug_assert! when running cargo test --release.Include the Apache 2.0 and MIT license files in the bitfield-macros package.
bitfield-macros package.bitfield-macros to syn 3.bitfield-macros parser by boxing large enum variants.Your coding agent can read these notes before it upgrades. Set up the MCP server →
Support try_into keyword in field definition to use TryInto instead of Into
try_into keyword in field definition to use TryInto instead of Intoimpl in no_std crates, thanks to @stop5 for reporting and proposing the fixIn debug mode, check that msb >= lsb in the default BitRange/BitRangeMut implementations and show a more helpful message than before if this is the ca
BitRange/BitRangeMut implementations and show a more helpful
message than before if this is the case, thanks to @blaine-dodson for reportingAllow usage of a signed int types for the base of newtype, thanks to @FeeeeK
Allow to use impl new with #[deny(missing_docs)].
impl new with #[deny(missing_docs)].Allow to specify an array of bools.
bool, then the Bit/BitMut traits are used instead of
BitRange/BitRangeMut. In some very unlikely case where the traits are implemented manually, this may break
existing code.Don't use __bitfield_* macros from the code generated by the proc-macros. Otherwise, they need to be imported by the calling code.
__bitfield_* macros from the code generated by the proc-macros. Otherwise, they need to be imported by
the calling code.mask, from and ìnto as getter names.With the new proc macro implementation some corner-cases that were not handled are now handled correctly.
Changes published as 0.16.2 (version now yanked) was breaking
Allow creating bitfield structs with arbitrary visibilities, thanks to @ADSteele916
Implement bitwise operations for all array-Like inner types, using AsRef/AsMut, thanks to @PokeJofeJr4th
AsRef/AsMut, thanks to @PokeJofeJr4thEasily Derive Bitwise Operations, thanks to @PokeJofeJr4th
Allow to generate mask for a field
Getters work with immutable Data
BitRange and Bit has been separated in the BitRangeMut and BitMut traits.from into can be used in place of from to change the input type of the setter. Thanks to @roblabla
from into can be used in place of from to change the input type of the setter. Thanks to @roblablaNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.