Appendices A-E - Rust Reference Notes
Appendix A - Keywords
Rust keywords are reserved words with language meaning, such as fn, let, mut, struct, enum, trait, impl, match, async, await, unsafe, and dyn.
For this ramp, the load-bearing ones are:
mut: mutation must be explicit;match: exhaustive branching;trait/impl: shared behavior and implementations;async/await: asynchronous execution;unsafe: manually upheld invariants;dyn: dynamic dispatch through trait objects.
Appendix B - Operators and Symbols
Common symbols:
&T: shared reference;&mut T: mutable reference;*const T/*mut T: raw pointers;::: namespace path;?: propagateResultorOption;!: macro call when after an identifier, never type in type position;|x|: closure parameter list;..: range or struct update syntax.
Appendix C - Derivable Traits
Useful derives:
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]
For systems work:
- derive
Debugon most config/state structs; - derive
Clonedeliberately, not as a reflex; - use
Copyonly for small plain values where implicit duplication is harmless; - derive
PartialEqfor test comparisons.
Appendix D - Useful Development Tools
Core commands:
cargo check
cargo test
cargo clippy
cargo fmt
cargo doc --open
rustup doc --book
For the GPU/Rust weeks, also know where the pinned toolchain lives: rust-toolchain.toml.
Appendix E - Editions
Rust editions let the language evolve without breaking old code. The 2024 edition is current for the third edition of the book, but many crates still use 2021. Match the repo’s Cargo.toml and toolchain pin before changing editions.
Quick Checks
- What does
?do in a function returningResult? - Why is
Copynot the same thing asClone? - What is the difference between
&mut Tand*mut T? - Why should you avoid changing a crate edition casually?