Rust: Zero to Hero

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.

How to Use This Quiz Track

  • Work through the parts in order; Parts 3 onward lean heavily on the ownership model from Part 2.
  • Each quiz has 20 multiple-choice questions, ordered from basic recall to edge cases to best-practice judgment calls.
  • Click Show Answer only after committing to a choice — many questions hinge on why the compiler accepts or rejects code, which only the explanation covers.
  • Expect borrow-checker "gotchas," lifetime elision surprises, and unsafe footguns — these are where real Rust competency is built.

Prerequisites

None for Part 1, though familiarity with a statically-typed language (C++, Java, Swift) makes the ownership model click faster.

Curriculum

Part 1 — Foundations

#TopicWhy It Matters
01Introduction & Setuprustup, toolchains, and editions set the stage for every later quiz.
02Hello World & CargoCargo is Rust's build tool, package manager, and test runner — non-negotiable daily tooling.
03Variables & MutabilityImmutability by default and shadowing are core Rust idioms that surprise newcomers.
04Data TypesInteger overflow behavior differs sharply between debug and release builds.
05FunctionsExpression-vs-statement semantics (no ; = return value) is a classic first-week trap.
06Control Flowif let, loop with break-values, and exhaustive match are distinctly Rust-flavored.

Part 2 — The Ownership Model

#TopicWhy It Matters
07OwnershipThe single idea that makes Rust memory-safe without a garbage collector.
08References & BorrowingThe borrow checker's aliasing rules are the most common source of "fighting the compiler."
09SlicesString slices and array slices avoid needless allocation but come with lifetime constraints.
10LifetimesLifetime elision rules and explicit annotations are the most-feared, most-misunderstood feature.

Part 3 — Data & Abstraction

#TopicWhy It Matters
11StructsStruct update syntax and method receivers (self vs &self vs &mut self) shape ergonomic APIs.
12EnumsOption and Result are enums — understanding variants unlocks idiomatic error handling.
13Pattern MatchingExhaustiveness checks and guard clauses catch bugs at compile time other languages miss.
14CollectionsVec, HashMap, and entry APIs are the daily-driver data structures.
15IteratorsLaziness, zero-cost abstraction claims, and adapter chaining are frequently misunderstood.
16Traits & GenericsTrait bounds, dyn vs impl Trait, and monomorphization drive Rust's polymorphism model.
17ClosuresFn/FnMut/FnOnce and capture-by-move are common sources of compiler errors.

Part 4 — Robustness & Concurrency

#TopicWhy It Matters
18Error Handling? propagation, panic! vs Result, and error trait objects define idiomatic reliability.
19Smart PointersBox, Rc, RefCell, and interior mutability trade compile-time checks for runtime ones.
20Modules & CratesVisibility rules (pub, pub(crate)) and the module tree shape API design.
21TestingBuilt-in #[test], integration tests, and doctests are core to Rust's reliability culture.
22ConcurrencySend/Sync and ownership transfer make Rust's "fearless concurrency" claim concrete.
23Async/AwaitFutures are lazy and runtime-agnostic — a frequent source of "why didn't this run" bugs.

Part 5 — Metaprogramming & Systems

#TopicWhy It Matters
24MacrosDeclarative (macro_rules!) vs. procedural macros power much of the ecosystem's ergonomics.
25Unsafe RustRaw pointers and manual invariants are where Rust's safety guarantees can be broken.
26FFICalling into C and #[repr(C)] layout guarantees are essential for systems interop.
27Attributes & CfgConditional compilation and derive macros are pervasive in real crates.
28Cargo FeaturesFeature flags and unification pitfalls affect every multi-crate workspace.

Part 6 — Expert & Professional

#TopicWhy It Matters
29Advanced Type SystemAssociated types, GATs, and variance explain why some generic code won't compile.
30Design PatternsBuilder, newtype, and typestate patterns are how Rust expresses OOP-style designs.
31PerformanceAllocation patterns, #[inline], and benchmarking pitfalls matter for systems-level code.
32DocumentationDoc comments and doctests double as both documentation and executable tests.
33EcosystemKnowing serde, tokio, and clippy conventions is table stakes for real Rust work.
34Common PitfallsA curated set of the mistakes that trip up developers moving from GC'd languages.
35Exercises & Projects (Capstone)A mixed-review capstone spanning ownership, traits, error handling, and concurrency.