RustLearn
Stop fighting the borrow checker. Start thinking like it.
Twenty modules from `cargo new` to async, macros and unsafe — theory first, drills second, and an analogy for every idea that usually takes three attempts.
The path you’ll walk
20 modules in the only order that works — ownership lands at module 04 because everything after it is a consequence, and nothing here forward-references what you have not met yet.
Setup, Cargo & Hello World
- Install the toolchain, learn what happens between a .rs file and a running binary, and get fluent with Cargo — the tool you will live inside for the rest of the course.
Variables, Types & Memory Basics
- Immutability by default, shadowing, constants, the scalar and compound types, and your first real look at the stack and the heap.
Control Flow & Functions
- Rust is expression-oriented: `if`, `match` and even loops produce values. Write well-typed functions and stop reaching for the statements you know from other languages.
Ownership
- The idea the whole language is built on. Moves, copies, drops, and why Rust needs neither a garbage collector nor a manual `free`.
Borrowing, References & Slices
- Lend data instead of giving it away. The borrow checker's two rules, mutable vs shared references, and slices as borrowed views into data.
Structs & Methods
- Model your domain with structs, attach behavior with `impl`, and learn the difference between methods, associated functions and constructors.
Enums & Pattern Matching
- Make illegal states unrepresentable. Enums carry data, `match` is exhaustive, and the compiler refuses to let you forget a case.
Option, Result & Error Handling
- No null, no exceptions. Absence and failure are ordinary values the type system forces you to handle — plus `?`, custom error types and error conversion.
Collections & Strings
- `Vec`, `HashMap`, `HashSet`, and the `String` vs `&str` split that trips up every newcomer — including what UTF-8 really means for indexing.
Modules, Crates & Project Layout
- Organize a real project: the module tree, visibility, paths, workspaces, dependencies, and publishing a crate to crates.io.
Generics
- Write code once for many types with zero runtime cost. Monomorphization, generic structs and functions, and trait bounds as requirements.
Traits & Trait Objects
- Shared behavior without inheritance. Trait definitions, default methods, blanket impls, the orphan rule, and static vs dynamic dispatch.
Lifetimes
- Annotations that tell the compiler how long references stay valid — the last piece of the borrow checker, and the one that finally makes E0106 readable.
Closures & Iterators
- Functional pipelines that compile down to hand-written loops. `Fn`/`FnMut`/`FnOnce`, laziness, adapters, and writing your own iterator.
Smart Pointers & Interior Mutability
- `Box`, `Rc`, `RefCell`, `Deref` and `Drop` — how to build trees, graphs and shared state when a single owner is not enough.
Testing, Docs & Tooling
- Unit, integration and documentation tests, plus clippy, rustfmt, benchmarks and a CI pipeline that keeps a crate honest.
Fearless Concurrency
- Threads, channels and `Arc<Mutex<T>>` — and the `Send`/`Sync` traits that turn data races from a debugging nightmare into a compile error.
Async Rust
- `async`/`await`, futures as state machines, the Tokio runtime, and the difference between concurrency and parallelism in practice.
Macros, Unsafe & FFI
- Code that writes code with `macro_rules!` and derive macros, the five superpowers of `unsafe`, and calling C from Rust (and back).
Idioms, Performance & Capstones
- Idiomatic API design, the anti-patterns to unlearn, profiling and optimization — then four full capstone projects to build from scratch.
Why learners stick with RustLearn
One path, in the right order
Setup → types → ownership → borrowing → traits → lifetimes → iterators → concurrency → async. Nothing forward-references; module 04 is where the language actually starts.
The compiler as your tutor
Real error output — E0382, E0502, E0106 — printed and decoded in the lesson, so the message that blocked you becomes the thing that taught you.
An analogy for every hard idea
Ownership as a tenancy agreement, borrowing as lending a book, lifetimes as the expiry date on a visitor pass. Intuition first, syntax second.
Graded drills with real solutions
Warm-ups, core exercises and challenges in every module — each with a worked solution folded away until you have committed to an attempt.
Track your progress
Checkboxes, per-part completion and module checkmarks are saved in your browser — pick up exactly where you left off.
Free, no signup
Open a module and start. No account, no paywall — your progress lives in your browser.
Ready to stop guessing at `&` and `mut`?
Start at the toolchain and walk the path — by module 05 the borrow checker stops being an obstacle and starts being a proof.
Start Learning — it's free