News for hackers. Stuff that matters.
Re:Static Integer Types by myrrlyn on Thursday July 01, 2021 @12:25PM (#27700863)
I am the author of a library that requires knowledge and awareness of integers that are strictly not wider than the general purpose register on the processor; the fact that `usize` is "the largest GPR" on every target Rust knows about is great but I'd still appreciate a distinction between "this fits in exactly one GPR" vs "this fits in the address bus"

_especially_ since the library in question creates pointers that are wider than `usize`

Re:Static Integer Types by Diggsey on Thursday July 01, 2021 @10:07PM (#27707178)
The definition clearly says that `usize` is pointer-sized, and makes no reference to register size, so it seems there's already a pretty clear distinction?

If you are specifically looking for a register sized tyoe then you should define it on a per-architecture basis via `cfg()` options.