#bit-vector #bitmap #bitvec #no-std

no-std nostd-bv

Bit-vectors and bit-slices

1 unstable release

0.11.2 Dec 31, 2024

#783 in Data structures

Download history 133/week @ 2024-12-28 42/week @ 2025-01-04 23/week @ 2025-01-11

198 downloads per month

MIT/Apache

160KB
3.5K SLoC

nostd-bv: bit-vectors and bit-slices for Rust

GitHub Workflow Status Crates.io Version GitHub License

The main type exported by the library, BitVec, is a packed, growable bit-vector. Its API mirrors that of Vec where reasonable. The library also defines slice operations that return BitSlice or BitSliceMut, akin to Rust’s array slices but for bit-vectors. A common API to bit-vectors and bit-slices is provided by the Bits, BitsMut, and BitsPush traits, which also allow treating as bit-vectors all primitive unsigned integer types (uN), and vectors and slices thereof, as well as unpacked vectors and slices of bool.

Usage

It’s on crates.io, so you can add

[dependencies]
nostd-bv = "0.11"

to your Cargo.toml.

License

Licensed under either of:

at your option.

Dependencies

~160KB