Ben Chuanlong Du's Blog

It is never too late to learn.

Manipulate Bits in Rust

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

bitvec

bitvec Addresses memory by bits, for packed collections and bitfields bitvec provides a foundational API for bitfields in Rust. It specializes standard-library data structures (slices, arrays, and vectors of bool) to use one-bit-per-bool storage, similar to std::bitset and std::vector in C++.

bit-iter

bit-iter Iterate forward or backwards over the positions of set bits in a word.

bit-vec

bit-vec A vector of bits

bit_field

bit_field Simple bit field trait providing get_bit, get_bits, set_bit, and set_bits methods for Rust's integral types.

bitfield

bitfield provides macros to generate bitfield-like struct.

bilge

Bilge allows you to use bitsized types as if they were a feature of rust.

Comments