`unative`: native integer type for arithmetic
⚓ Rust 📅 2026-05-23 👤 surdeus 👁️ 2Following the discussion about native integer types here and here, I have published a crate unative that defines such a type.
@vigna might be interested.
The concept of "native integer type" has no unambiguous definition, but we try to choose the largest width for which the target supports efficient hardware arithmetic, including multiplication and division.
Often this is the same width as
usize, but not always. For example, onx86_64-unknown-linux-gnux32,usizeis 32 bits andUNativeis 64 bits.
1 post - 1 participant
🏷️ Rust_feed