What happens when I use i64 on a 32 bit machine

Hello,
I don’t have access to a 32 bit machine, so I can’t test this out, but what happens when you make the type of something i64 on a 32 bit machine? Does it behave like an i32, or does rust represent it by multiple integer types (similar to javs’s BigNumber)?

1 Like

If the hardware of your target doesn't natively support i64, operations will be implemented in software. It always behaves the same, regardless of the platform.

2 Likes

Note that many 32-bit architectures do have native support for 64-bit integers (as well as 32-bit, 16-bit, and 8-bit integers).

9 Likes