Rs rust
A complete quiz-based curriculum covering Rust from first principles to expert-level, production-grade knowledge. Ownership and the borrow checker are the spine of the language — the curriculum is sequenced so every later quiz assumes you can reason about them.
Part 1 — Foundations
6 topicsIntroduction & Setup
rustup, toolchains, and editions set the stage for every later quiz.
Hello World & Cargo
Cargo is Rust's build tool, package manager, and test runner — non-negotiable daily tooling.
Variables & Mutability
Immutability by default and shadowing are core Rust idioms that surprise newcomers.
Data Types
Integer overflow behavior differs sharply between debug and release builds.
Functions
Expression-vs-statement semantics (no ; = return value) is a classic first-week trap.
Control Flow
if let, loop with break-values, and exhaustive match are distinctly Rust-flavored.
Part 2 — The Ownership Model
4 topicsOwnership
The single idea that makes Rust memory-safe without a garbage collector.
References & Borrowing
The borrow checker's aliasing rules are the most common source of "fighting the compiler."
Slices
String slices and array slices avoid needless allocation but come with lifetime constraints.
Lifetimes
Lifetime elision rules and explicit annotations are the most-feared, most-misunderstood feature.
Part 3 — Data & Abstraction
7 topicsStructs
Struct update syntax and method receivers (self vs &self vs &mut self) shape ergonomic APIs.
Enums
Option and Result are enums — understanding variants unlocks idiomatic error handling.
Pattern Matching
Exhaustiveness checks and guard clauses catch bugs at compile time other languages miss.
Collections
Vec, HashMap, and entry APIs are the daily-driver data structures.
Iterators
Laziness, zero-cost abstraction claims, and adapter chaining are frequently misunderstood.
Traits & Generics
Trait bounds, dyn vs impl Trait, and monomorphization drive Rust's polymorphism model.
Closures
Fn/FnMut/FnOnce and capture-by-move are common sources of compiler errors.
Part 4 — Robustness & Concurrency
6 topicsError Handling
? propagation, panic! vs Result, and error trait objects define idiomatic reliability.
Smart Pointers
Box, Rc, RefCell, and interior mutability trade compile-time checks for runtime ones.
Modules & Crates
Visibility rules (pub, pub(crate)) and the module tree shape API design.
Testing
Built-in #[test], integration tests, and doctests are core to Rust's reliability culture.
Concurrency
Send/Sync and ownership transfer make Rust's "fearless concurrency" claim concrete.
Async/Await
Futures are lazy and runtime-agnostic — a frequent source of "why didn't this run" bugs.
Part 5 — Metaprogramming & Systems
5 topicsMacros
Declarative (macro_rules!) vs. procedural macros power much of the ecosystem's ergonomics.
Unsafe Rust
Raw pointers and manual invariants are where Rust's safety guarantees can be broken.
FFI
Calling into C and #[repr(C)] layout guarantees are essential for systems interop.
Attributes & Cfg
Conditional compilation and derive macros are pervasive in real crates.
Cargo Features
Feature flags and unification pitfalls affect every multi-crate workspace.
Part 6 — Expert & Professional
7 topicsAdvanced Type System
Associated types, GATs, and variance explain why some generic code won't compile.
Design Patterns
Builder, newtype, and typestate patterns are how Rust expresses OOP-style designs.
Performance
Allocation patterns, #[inline], and benchmarking pitfalls matter for systems-level code.
Documentation
Doc comments and doctests double as both documentation and executable tests.
Ecosystem
Knowing serde, tokio, and clippy conventions is table stakes for real Rust work.
Common Pitfalls
A curated set of the mistakes that trip up developers moving from GC'd languages.
Exercises & Projects (Capstone)
A mixed-review capstone spanning ownership, traits, error handling, and concurrency.