NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io, #429 most downloaded on crates.io
Addresses memory by bits, for packed collections and bitfields
Latest stable
1.1.1
Last release 5 months ago
18 Jun 2026
Ships unpredictably
gaps range from 1 weeks to 3.9 years
Some releases are documented
notes for 7 of 27 stable releases
33 versions withdrawn
withdrawn after publishing
8 years old
61 releases · first in 2018
Drag across the ruler to compare, or tap a release to open it.
Nothing published for this version
Performance regressions have been reported between the development series 0.20 onwards and 1.0. It appears at least some of these regressions are due
Performance regressions have been reported between the development series 0.20
onwards and 1.0. It appears at least some of these regressions are due to the
removal of the #[inline] attribute on bitvec public functions.
This attribute has been applied to all bitvec functions. You may see
regressions in size of your final artifact, but you should also see improvements
in your runtime speed. This is being tracked in [sharksforarms/deku#246].
The bits![static mut …] invocation has been made unsafe at the invocation
site, in response to [Issue #156] filed by GitHub user [@SimonSapin].
This is technically an API break (formerly safe code now requires an unsafe
block) but as no run-time behavior or compile-time types have changed except
for this, and Rust considers breaking incorrect code to be acceptable within
SemVer patches, I am publishing it as a patch.
GitHub user [@dtolnay] fixed incorrect serde behaviors in
[Pull Request #185]. This behavior was first reported in [Issue #167] by
GitHub user [@Nelarius].
Compilation no longer depends on environment variables set by Cargo, as requested in [Pull Request #162] by GitHub user [@rocallahan].
The bitvec![val; len] macro can again take len as a runtime value as well
as a compile-time constant. [Pull Request #160] was provided by GitHub user
[@coolreader18].
The return types of slice::Iter::by_{refs,vals} are restored to named types,
rather than impl Iterator... opaque types. This allows them to be used
directly in other sites. This defect was reported in [Issue #169] by GitHub
user [@dignifiedquire].
Your coding agent can read these notes before it upgrades. Set up the MCP server →
🚨 THIS IS A BREAKING CHANGE RELEASE! 🚨
🚨 THIS IS A BREAKING CHANGE RELEASE! 🚨
Your code has broken. You will need to change it in order to use this. This work on your part is worth it.
This release has a great deal of changes from the 0.22 development series!
Most breaking changes should have reasonable error messages indicating how they
can be repaired.
Removed APIs do not have deprecation notices! Use of removed APIs will fail to compile. You must check this changelog, or the crate documentation, to find out appropriate replacements.
The <O, T> type parameter pair that has existed since 0.10 is reversed
to be <T, O>! This will cause all of your type definitions to fail, as
suddenly all of your chosen type arguments do not satisfy the demanded traits.
This change was made in accordance with [Issue #136], requested by GitHub user [@changhe3].
1.56.BitField now supports signed integers! BitMemory is completely removed.BitSlice::from_slice{,_mut} are now infallible constructors, and panic when
the source is too long. The original fallible behavior is renamed to
BitSlice::try_from_slice{,_mut}.{Bit,}DomainMut types have been removed. The {Bit,}Domain types now
take a Mutability type parameter instead. The .{bit_,}domain{,_mut}()
methods on BitSlice exist as normal, but have changed their return types to
specify a Const or Mut type parameter rather than {Bit,}Domain or
{Bit,}DomainMut, respectively.Iter::by_{ref,val} are renamed to by_{ref,val}s, to prevent collision with
Iterator::by_ref.&=, |=, and ^= operators has been
changed! They now operate directly on data structures, rather than routing
through iterators. If you want to perform boolean arithmetic using arbitrary
bool streams, use iterator combinators like
.iter_mut().zip(stream).for_each(|(mut orig, new)| *orig ^= new). This
change allows the arithmetic implementations to be accelerated when working
between bit-slices of equal types.BitSlice::set_all is removed, as the standard-library API [T]::fill
replaces it.BitSlice::offset_from is removed. Use .as_bitptr().offset_from().BitSlice::as_raw_slice is removed. Use .domain() to access the underlying
memory.Module and type documentation have been lifted into the doc/ tree as Markdown
files. The [user guide], in book/ has been more thoroughly rewritten.
Please file any problems or confusions about the documentation as an issue! The documentation is a project artifact equally, if not more, important as the Rust library.
As part of the migration of incidental logic out of bitvec, the following
utility libraries have been updated:
funty 2.0 provides a more comprehensive coverage of the language primitives.wyz 0.5 contains more logic formerly in the utility module, as well as a
stronger system for generalizing over references.bitvec’s first three and a half years of development used the zero-dot series
as it explored its behavior. These versions are now deprecated and will not
receive further support. They are listed only in summary, and may be removed
from crates.io in the future.
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
Raised MSRV to 1.51 for const generics.
1.51 for const generics.Iter::by_{ref,val}.wyz 0.4.Nothing published for this version
Nothing published for this version
Raised funty dependency to ~1.2.
funty dependency to ~1.2.bitarr! and into BitArr!.BitVec::from_{element,slice} constructors for [Issue #6], reöpened
by GitHub user [@HamishWMC].BitSlice::{first,last}_{one,zero}, requested in
[Issue #103] by GitHub user [@seanyoung].BitSlice::{leading,trailing}_{ones,zeros}, also in #103 by @seanyoung.static to the bits! argument for hidden-static construction.Iter{Ones,Zeros} with specialization.BitVec::insert exactly at self.len().Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Removed deprecated BitView methods.
Cell types as the original storage type..iter_{ones,zeros}) to match APIs in [bit-set],
requested in [Issue #83] by GitHub user [@arucil].<T: Unsigned as BitStore>::Alias system to prevent improper
mutation.IntoIterator on BitArray.BitVec from integer elements, not just bits..remove_alias() to mutable-bit-slice iterators.core::ptr as bitvec::ptr.BitMut to BitRef and create single-bit BitPtr pointers.BitPtrRange as an analogue to Range<*bool>.BitView methods.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
Accelerated BitSlice::copy_from_bitslice
BitSlice::copy_from_bitsliceBitSlice::offset_from to enable computing how far into a base
bit-slice a subslice begins.radium 0.5’s stronger type system, including fallback aliases when
targets do not have atomics.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Renamed the C-compatible ordering Local to LocalBits.
1.44.Local to LocalBits.LocalBits to
Lsb0.BitStore::Alias system for coöperative mutation.BitView alongside AsBits
and AsBitsMut.BitArray, as requested in [Issue #32] by GitHub user
[@FedericoPonzi]. This also includes a bitarr! constructor.BitMemory describes all
unsigned integers, not just BitStore implementors, and BitField can
transact them all.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
In [Pull Request #34], GitHub user [@mystor] provided a bits! implementation that encodes buffers at compile time, and allows them to be borrowed as B
bits! implementation
that encodes buffers at compile time, and allows them to be borrowed as
BitSlices.Cursor to BitOrder, and LittleEndian and BigEndian to Lsb0
and Msb0.Words alias, and implemented BitStore on `usize.As{Ref,Mut}<BitSlice<_, T>> implementations for [T], as
requested in [Issue #35] by GitHub user [@Fotosmile].Nothing published for this version
Nothing published for this version
Created Cursor::mask for faster direct memory access.
Cursor::mask for faster direct memory access.BitField trait.Word alias to the target’s usize equivalent (now just usize).Local implementation of Cursor (now the LocalBits alias).<Local, Word>.index module, reducing runtime assertions.BitVec::reserve.radium dependency to 0.3, fixing [Issue #36] reported by GitHub
user [@lynaghk].Nothing published for this version
Nothing published for this version
Reärranged the feature set to use the now-available extern crate alloc;.
1.36.extern crate alloc;.Send from BitSlice.bitvec! repetition constructor, as reported in [Issue #28] by
GitHub user [@caelunshun].Added reversed (left-to-right) addition, requested in [Issue #16] by GitHub user [@GeorgeGkas].
Changed the bit-region pointer encoding to its final form.
Created BitSlice::at, which manifests a proxy reference to a single bit.
BitSlice::at, which manifests a proxy reference to a single bit.Bits to BitStoreBits and BitsMut traits to view ordinary memory as a
bit-slice.Nothing published for this version
Nothing published for this version
Nothing published for this version
Created the domain module, which manages all translations of bit-precision views into raw underlying memory.
1.33.domain module, which manages all translations of bit-precision
views into raw underlying memory.bitbox! macro constructor.BitBox and BitVec are now Sync, per discussions with [@ratorx].serde support (behind the serde feature).Nothing published for this version
Nothing published for this version
Created the BitPtr (now BitSpan) pointer encoding that enables addressing any bit, not just the front of an element.
1.31.BitPtr (now BitSpan) pointer encoding that enables addressing
any bit, not just the front of an element..count_{ones,zeros} inside single-element bit-slices.Send and
Sync on BitSlice.u64 on 32-bit targets.Renamed Endian to Cursor (now BitOrder)
Endian to Cursor (now BitOrder)Default bound on Bits (now BitStore)Nothing published for this version
Added alloc and std features in [Pull Request #3] by GitHub user [@rphmeier].
alloc and std features in [Pull Request #3] by GitHub user
[@rphmeier].Nothing published for this version
Renamed .count_{one,zero} to .count_{ones,zeros}.
1.25..count_{one,zero} to .count_{ones,zeros}.Nothing published for this version
Created numeric 2’s-complement arithmetic implementations.
Hash.all, any, not_all, not_any, some,
count_one, count_zero).Added more trait implementations.
BitSlice::for_each.Added BitSlice, and offloaded much of the BitVec API to it.
BitSlice, and offloaded much of the BitVec API to it.Expanded bitvec! argument syntax, and improved its codegen.
bitvec! argument syntax, and improved its codegen.One column per quarter.