| Crates.io | cpubits |
| lib.rs | cpubits |
| version | 0.1.0-rc.1 |
| created_at | 2026-01-18 19:15:09.030829+00 |
| updated_at | 2026-01-23 18:25:00.157193+00 |
| description | 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!` |
| homepage | |
| repository | https://github.com/RustCrypto/utils |
| max_upload_size | |
| id | 2052907 |
| size | 28,540 |
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!.
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; }
}
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.
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.