Core Language Basics
- Variables, mutability, and shadowing
- Primitive types and their memory representations
- Functions, control flow, and pattern matching
- Modules and project structure with Cargo
Start Here:
- The Rust Book (chapters 1-6)
- Practice with small CLI programs
Deep Dive into Ownership
- Stack vs heap allocation
- Move semantics and Copy trait
- Borrowing rules and the borrow checker
- Lifetimes and lifetime annotations
- Reference types and their costs
Low-Level Focus:
- Understanding
std::mem::size_ofand memory layout - Drop trait and RAII patterns
- Interior mutability (
Cell,RefCell) - Zero-cost abstractions concept
Resources:
- Rust Book chapters 4, 10, 15
- "Visualizing Memory Layout of Rust's Data Types" blog posts
- Practice: Implement data structures from scratch (linked list, vector)
Understanding Unsafe
- Raw pointers and pointer arithmetic
- Unsafe superpowers and guarantees
- Calling C code (FFI)
- Writing safe abstractions over unsafe code
Projects:
- Create FFI bindings to a C library
- Implement a custom allocator
- Build unsafe data structures (intrusive linked list)
Resources:
- Rust Book chapter 19
- The Rustonomicon (start reading)
Memory Deep Dive
std::memfunctions (transmute,forget,ManuallyDrop)- Understanding
PinandUnpin - Custom smart pointers
- Memory ordering and atomics
Concurrency Model
- Send and Sync traits
- Arc, Mutex, and atomic reference counting
- Lock-free data structures
- Thread safety guarantees
Resources:
- The Rustonomicon (complete)
- "Programming Rust" by Blandy & Orendorff (chapters on concurrency)
Low-Level Performance
- Understanding LLVM IR generation
- Inline assembly
- SIMD operations
- Profiling and benchmarking
- Reading generated assembly (
cargo asm)
Projects:
- Optimize hot paths in real code
- Write SIMD-accelerated algorithms
- Benchmark different approaches
Advanced Topics
- Custom allocators and allocator APIs
- Async/await internals and Future trait
- Procedural macros
- Building OS components or embedded systems
Project Ideas:
- Write a memory allocator
- Build a simple kernel or bootloader
- Create embedded firmware (no_std)
- Implement a virtual machine or interpreter
Books:
- The Rust Programming Language (The Book)
- The Rustonomicon (unsafe Rust)
- Rust for Rustaceans by Jon Gjengset
- Programming Rust by Blandy & Orendorff
Online:
- Rust compiler development guide
- Jon Gjengset's YouTube channel (Crust of Rust series)
- Fasterthanlime's blog posts
- "Learn Rust With Entirely Too Many Linked Lists"
Practice:
- Implement standard library components from scratch
- Contribute to systems-level crates
- Read source code: tokio, servo, ripgrep
- Read theory (1-2 hours)
- Code exercises (2-3 hours)
- Analyze assembly output of your code (30 min)
- Deep dive into one standard library type's implementation (1 hour)
- Experiment with unsafe code in controlled environment (1 hour)
- Always ask: "What's happening in memory?"
- Read compiler error messages carefully—they teach ownership
- Use tools:
cargo expand,cargo asm,cargo miri - Don't fear unsafe, but respect it
- Understand the "zero-cost abstraction" principle