Bit Arrays in RUST


#1

Hi all,
I am a new to RUST and I have to build a system that uses very large bit arrays.
My question is: How can I implement these large bit arrays in RUST?

Thanks in advance


#2

https://crates.io/crates/bit-vec looks popular


#3

Hi,
thanks for an answer, where can i get the Crate bit_vec, my test program can’t find the Crate?


#4

You add crates by:

  1. Adding them to Cargo.toml [dependencies] section (bit-vec = "0.5.0")
  2. Adding extern crate bit_vec; in root source code file of your project (lib.rs/main.rs)
  3. Optionally, in other modules in your project (other than the one with extern crate), use bit_vec;

#5

Thank You very much Kornel, it works!!! :slight_smile: