If there a conditional check for whether processor is 32-bit or 64-bit? I'm looking for kind of configuration check like e.g. #cfg[x86] or cfg[x64].
#cfg[x86]
cfg[x64]
The #[cfg(target_pointer_width = "64")] from the cfg section in the Rust reference seems like a likely solution. It is based on the size of a pointer (as well as isize and usize), which should correspond to the architecture.
#[cfg(target_pointer_width = "64")]
isize
usize
1.4m articles
1.4m replys
5 comments
57.0k users