Skip to content

Instantly share code, notes, and snippets.

@mxhold
Last active February 17, 2017 20:00
Show Gist options
  • Save mxhold/661aff9135470b7784bc26133f31cf0d to your computer and use it in GitHub Desktop.
Save mxhold/661aff9135470b7784bc26133f31cf0d to your computer and use it in GitHub Desktop.
Integers in Rust
Type Length (bits) Minimum value Maximum value
u8 8 0 255
i8 8 -128 127
u16 16 0 65,535
i16 16 -32,768 32,767
u32 32 0 4,294,967,295
i32 32 -2,147,483,648 2,147,483,647
u64 64 0 18,446,744,073,709,551,615
i64 64 -9,223,372,036,854,775,808 9,223,372,036,854,775,807
usize architecture-dependent 0 architecture-dependent
isize architecture-dependent architecture-dependent architecture-dependent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment