bitvec
Addresses memory by bits, for packed collections and bitfields
1.1.1
261M downloads/mo
#402 most downloaded on crates.io
bitvecto-rs/bitvec
What this package is like to depend on
Last release 2 months ago
18 Jun 2026
Ships unpredictably
gaps range from 1 weeks to 3.9 years
Rarely documented
notes for 2 of 27 stable releases
33 versions withdrawn
withdrawn after publishing
8 years old
61 releases · first in 2018
1 release in the last 12 months
see the full history below
Release timeline
61 releases · Jun 2018 to Jun 2026Releases
latest 60 of 61-
1.1.118 Jun 2026Nothing published for this version
-
1.0.110 Jul 2022Release notes
Open source →Notes
Performance regressions have been reported between the development series
0.20onwards and1.0. It appears at least some of these regressions are due to the removal of the#[inline]attribute onbitvecpublic functions.This attribute has been applied to all
bitvecfunctions. 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].Changes
-
The
bits![static mut …]invocation has been madeunsafeat 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
unsafeblock) 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
serdebehaviors 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 takelenas 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 thanimpl Iterator...opaque types. This allows them to be used directly in other sites. This defect was reported in [Issue #169] by GitHub user [@dignifiedquire].
-
-
1.0.011 Jan 2022Release notes
Open source →🚨 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.22development 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.
Type Parameter Reördering
The
<O, T>type parameter pair that has existed since0.10is 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].
Additional Changes
- The MSRV is raised to
1.56. BitFieldnow supports signed integers!BitMemoryis completely removed.BitSlice::from_slice{,_mut}are now infallible constructors, and panic when the source is too long. The original fallible behavior is renamed toBitSlice::try_from_slice{,_mut}.- the
{Bit,}DomainMuttypes have been removed. The{Bit,}Domaintypes now take aMutabilitytype parameter instead. The.{bit_,}domain{,_mut}()methods onBitSliceexist as normal, but have changed their return types to specify aConstorMuttype parameter rather than{Bit,}Domainor{Bit,}DomainMut, respectively. Iter::by_{ref,val}are renamed toby_{ref,val}s, to prevent collision withIterator::by_ref.- The long-standing behavior of the
&=,|=, 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 arbitraryboolstreams, 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_allis removed, as the standard-library API[T]::fillreplaces it.BitSlice::offset_fromis removed. Use.as_bitptr().offset_from().BitSlice::as_raw_sliceis removed. Use.domain()to access the underlying memory.
Documentation
Module and type documentation have been lifted into the
doc/tree as Markdown files. The [user guide], inbook/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.
Dependency Raises
As part of the migration of incidental logic out of
bitvec, the following utility libraries have been updated:funty 2.0provides a more comprehensive coverage of the language primitives.wyz 0.5contains more logic formerly in the utility module, as well as a stronger system for generalizing over references.
Version 0 (Prototyping)
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. - The MSRV is raised to
-
1.0.0-rc205 Jan 2022 pre-releaseNothing published for this version
-
1.0.0-rc101 Dec 2021 pre-release withdrawnNothing published for this version
-
0.22.318 Apr 2021Nothing published for this version
-
0.22.218 Apr 2021 withdrawnNothing published for this version
-
0.22.101 Apr 2021Nothing published for this version
-
0.22.029 Mar 2021Nothing published for this version
-
0.21.201 Apr 2021Nothing published for this version
-
0.21.104 Mar 2021Nothing published for this version
-
0.21.014 Feb 2021Nothing published for this version
-
0.20.423 Apr 2021Nothing published for this version
-
0.20.323 Apr 2021Nothing published for this version
-
0.20.204 Mar 2021Nothing published for this version
-
0.20.124 Dec 2020Nothing published for this version
-
0.20.022 Dec 2020Nothing published for this version
-
0.19.621 Nov 2021Nothing published for this version
-
0.19.504 Mar 2021Nothing published for this version
-
0.19.426 Oct 2020Nothing published for this version
-
0.19.302 Oct 2020Nothing published for this version
-
0.19.225 Sep 2020Nothing published for this version
-
0.19.119 Sep 2020Nothing published for this version
-
0.19.010 Sep 2020Nothing published for this version
-
0.18.504 Mar 2021Nothing published for this version
-
0.18.419 Sep 2020Nothing published for this version
-
0.18.309 Sep 2020Nothing published for this version
-
0.18.101 Sep 2020Nothing published for this version
-
0.18.001 Sep 2020Nothing published for this version
-
0.17.427 Mar 2020Nothing published for this version
-
0.17.305 Mar 2020 withdrawnNothing published for this version
-
0.17.223 Jan 2020 withdrawnNothing published for this version
-
0.17.113 Jan 2020 withdrawnNothing published for this version
-
0.17.011 Jan 2020 withdrawnNothing published for this version
-
0.16.207 Jan 2020 withdrawnNothing published for this version
-
0.16.104 Dec 2019 withdrawnNothing published for this version
-
0.16.025 Nov 2019 withdrawnNothing published for this version
-
0.15.216 Sep 2019 withdrawnNothing published for this version
-
0.15.124 Aug 2019 withdrawnNothing published for this version
-
0.15.022 Aug 2019 withdrawnNothing published for this version
-
0.14.021 Jun 2019 withdrawnNothing published for this version
-
0.13.007 Jun 2019 withdrawnNothing published for this version
-
0.12.007 Jun 2019 withdrawnNothing published for this version
-
0.11.308 Jun 2019 withdrawnNothing published for this version
-
0.11.207 Jun 2019 withdrawnNothing published for this version
-
0.11.113 May 2019 withdrawnNothing published for this version
-
0.11.011 May 2019 withdrawnNothing published for this version
-
0.10.228 Apr 2019 withdrawnNothing published for this version
-
0.10.112 Apr 2019 withdrawnNothing published for this version
-
0.10.007 Mar 2019 withdrawnNothing published for this version
-
0.9.011 Dec 2018 withdrawnNothing published for this version
-
0.9.0-e201811 Dec 2018 pre-release withdrawnNothing published for this version
-
0.8.025 Nov 2018 withdrawnNothing published for this version
-
0.8.0-e201825 Nov 2018 pre-release withdrawnNothing published for this version
-
0.6.024 Oct 2018 withdrawnNothing published for this version
-
0.6.0-e201824 Oct 2018 pre-release withdrawnNothing published for this version
-
0.5.007 Jul 2018 withdrawnNothing published for this version
-
0.4.004 Jul 2018 withdrawnNothing published for this version
-
0.3.004 Jul 2018 withdrawnNothing published for this version
-
0.2.028 Jun 2018 withdrawnNothing published for this version