Understand the purpose and scope of The Rustonomicon
masterThe Rustonomicon is a guide focused on the 'Dark Arts' of Unsafe Rust. It is intended for developers who already have a strong grasp of basic systems programming and Rust and wish to understand the low-level details of the language.
Key characteristics:
- Focus: It describes how to use language pieces together and the issues that arise when doing so (e.g., combining references, destructors, and unwinding), rather than just detailing syntax.
- Prerequisites: It assumes considerable prior knowledge of Rust and systems programming. It is recommended to read The Rust Programming Language first if you are not comfortable with these topics.
- Relationship to The Reference: While The Reference details syntax and semantics, The Rustonomicon explains the practical implications and complexities of those semantics. If the two documents disagree, assume The Reference is correct.
- Scope: Topics include (un)safety, unsafe primitives, creating safe abstractions, subtyping, variance, exception-safety, uninitialized memory, type punning, concurrency, FFI, and optimization.
- Edition: Unless otherwise noted, all Rust code examples in this book use the Rust 2024 edition.