Pointer-sized integer
A pointer-sized integer is a signed or unsigned integer type whose width matches the target platform’s pointer size.
Learn Rust in a Month of Lunches
A pointer-sized integer is a Rust signed or unsigned integer whose width matches the computer architecture.
- How it is used
- Introduces isize and usize as integer types and uses usize for array indexing and generic array lengths.
- How deep it goes
- Defines signedness and explains bits and binary, then illustrates usize in a const-generic declaration without detailing pointer representation.
- Examples
- Uses fixed-width integer ranges and a generic struct containing two arrays with a shared usize length.
- What you can do after
- Understand the distinction between isize and usize and recognize usize in an array-length declaration.
Read how Learn Rust in a Month of Lunches explains pointer-sized integer →
Rust in Action: Systems programming concepts and techniques
isize is Rust's signed integer type whose width matches the target platform's pointer size.
- How it is used
- Uses isize to name a signed, pointer-width integer while explaining memory addresses, address spaces, and virtual memory.
- How deep it goes
- Defines pointer-sized width and links it to CPU registers, but stops short of detailed isize operations or code examples.
- Examples
- Compares isize with word-sized memory units, pointer widths, CPU registers, and pointer diagrams.
- What you can do after
- Evaluate how a Rust integer’s width relates to pointers, memory addresses, and the target machine.
Also covered in
What to know first
- optionAn option type is a type that represents either a value of a specified type or its absence as distinct alternatives.
Related concepts
- indexinguses · Indexing is the process of assigning or using positions, keys, or lookup structures to identify and access elements or records.
- const genericsused by · Const generics are generic parameters whose values are compile-time constants rather than types or runtime values.
- slicingpart of · Slicing selects or partitions a portion of an indexed sequence or multidimensional array, often along specified indices or dimensions.
- function pointer typeused by · A function pointer is a value that designates a callable function and can be stored, passed, or invoked indirectly.
- unsigned integercontrasts with · An unsigned integer is an integer type or representation whose values are nonnegative.
Questions about pointer-sized integer
What is pointer-sized integer?
A pointer-sized integer is a signed or unsigned integer type whose width matches the target platform’s pointer size.
Which Manning books explain pointer-sized integer?
Learn Rust in a Month of Lunches and Rust in Action: Systems programming concepts and techniques.
What should I know before learning pointer-sized integer?
Manning books that teach pointer-sized integer usually introduce option first.
What is the difference between pointer-sized integer and unsigned integer?
A pointer-sized integer is a signed or unsigned integer type whose width matches the target platform’s pointer size. An unsigned integer is an integer type or representation whose values are nonnegative.
What is pointer-sized integer part of?
Pointer-sized integer is part of slicing. Slicing selects or partitions a portion of an indexed sequence or multidimensional array, often along specified indices or dimensions.
What is pointer-sized integer also called?
Pointer-sized integer is also called usize or isize.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

