Raw Pointers and Dereferencing Them
A raw pointer is a plain address with no guarantees attached: it may be null, may point at freed memory, and the compiler tracks nothing about it. You can create and pass one anywhere, but reading or writing through it is only allowed inside an unsafe block. They exist because addresses arriving from hardware or from C code have no proof behind them.
Questions this Concept answers
- Why does Rust allow creating a raw pointer in safe code but not reading through one?
Unsafe Rust, Advanced Traits, Types, and Macros
Video tutorial: Unsafe Rust, Advanced Traits, Types, and Macros