bitness

Crates.iobitness
lib.rsbitness
version0.4.0
sourcesrc
created_at2018-01-11 23:44:50.566309
updated_at2020-11-20 15:32:40.723762
descriptionRust library for detecting OS bitness independently of the executable's bitness. Windows, GNU/Linux and FreeBSD currently supported.
homepage
repositoryhttps://github.com/forbjok/rust-bitness
max_upload_size
id46444
size26,414
(forbjok)

documentation

README

Bitness Build Status Build status Crates.io

Rust library for detecting OS bitness independently of the executable's bitness. Windows, GNU/Linux and FreeBSD currently supported.

How to use

let bitness = bitness::os_bitness().unwrap();

match bitness {
  Bitness::X86_32 => println!("We're 32-bit!"),
  Bitness::X86_64 => println!("We're 64-bit!"),
  _ => { }
}
Commit count: 30

cargo fmt