cpubits 0.1.0-rc.1

Compile-time detection heuristics for the optimal word size to use for the target CPU, which in some cases may differ from its address size a.k.a. `target_pointer_width`. Implemented as `macro_rules!`
Documentation

RustCrypto: CPU bits selection

crate Docs Build Status Apache2/MIT licensed Rust Version Project Chat

Compile-time detection heuristics for the optimal word size to use for the target CPU, which in some cases may differ from its address size a.k.a. target_pointer_width.

Implemented as macro_rules!.

Documentation

Example

Below is a basic example of how you can use the cpubits! macro:

cpubits::cpubits! {
    16 => { pub type Word = u16; }
    32 => { pub type Word = u32; }
    64 => { pub type Word = u64; }
}

License

Licensed under either of:

at your option.

Includes portions from the cfg-if crate, which are also dual-licensed Apache 2.0 + MIT. Copyright (c) 2014 Alex Crichton.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.