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
- Uses `usize` for array indexing and const-generic array lengths; lists `isize` among signed integer types.
- How deep it goes
- Defines the types within an integer survey and demonstrates `usize` in a struct; does not calculate architecture-specific widths.
- Examples
- Shows a struct with `const N: usize` and two arrays, then creates instances with lengths three and four.
- What you can do after
- Apply it via Rust's `usize` to declare a const-generic array length.
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.
Related concepts
- indexinguses · Indexing is the organization or use of positions, keys, or lookup structures to identify and retrieve selected data or elements.
- 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 parameterused by · A function parameter is a named input declared in a function definition that receives a corresponding argument value when the function is called.
- function pointer typeused by · A function pointer is a value that designates a callable function and can be stored, passed, or invoked indirectly.
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.

