liveBook · Manning

Raw pointer

A raw pointer is a value that represents a memory address and can be dereferenced without the validity and aliasing guarantees provided by a managed reference.

How 2 Manning books explain it

Embedded Software with Rust

Raw pointer dereferencing accesses memory through a Rust raw pointer without the safety guarantees of an ordinary reference.

How it is used
Introduces direct memory-mapped register access and uses raw pointers for manual allocation and Rust–C interoperability.
How deep it goes
Explains unsafe dereferencing, address and alignment checks, volatile access, and alternatives through worked code.
Examples
Uses STM32F1 GPIO and SysTick registers, manual heap allocation, and a C-facing output pointer.
What you can do after
Apply it to low-level register access while checking pointer obligations and choosing volatile operations for MMIO.

Read how Embedded Software with Rust explains raw pointer →

Refactoring to Rust

A raw pointer is a Rust pointer whose dereferencing and validity are not governed by the borrow checker and may require an unsafe context.

How it is used
Connects Rust to C and other externally allocated memory through FFI and unchecked memory access.
How deep it goes
Explains addresses, validity, constness, buffer traversal, null checks, and slices, but leaves validity guarantees to the programmer.
Examples
Uses a Vec<u8> reader, stack-memory diagrams, C-style struct access, nested null checks, and NGINX request buffers.
What you can do after
Apply it via unsafe blocks to read buffers and access C structures while checking pointers, lengths, and slice boundaries.

Read how Refactoring to Rust explains raw pointer →

What to know first

Related concepts

Questions about raw pointer

What is raw pointer?

A raw pointer is a value that represents a memory address and can be dereferenced without the validity and aliasing guarantees provided by a managed reference.

Which Manning books explain raw pointer?

Embedded Software with Rust and Refactoring to Rust.

What should I know before learning raw pointer?

Manning books that teach raw pointer usually introduce lifetime, ownership and reference first.

What is the difference between raw pointer and typed register overlay?

A raw pointer is a value that represents a memory address and can be dereferenced without the validity and aliasing guarantees provided by a managed reference. A typed register overlay is a structure whose typed fields correspond to hardware registers at fixed memory offsets.

What is raw pointer a kind of?

Raw pointer is a kind of pointer. A pointer is a value that identifies a memory location and enables indirect access to the data stored there.

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.