Skip to content
RustLearn

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.

20 modulesTheory + exercises in every one100+ graded exercises4 capstone projects100% free

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.

01

Setup, Cargo & Hello World

~14 min read · theory + drills
  • 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.
Open module
02

Variables, Types & Memory Basics

~15 min read · theory + drills
  • Immutability by default, shadowing, constants, the scalar and compound types, and your first real look at the stack and the heap.
Open module
03

Control Flow & Functions

~12 min read · theory + drills
  • 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.
Open module
04

Ownership

~15 min read · theory + drills
  • The idea the whole language is built on. Moves, copies, drops, and why Rust needs neither a garbage collector nor a manual `free`.
Open module
05

Borrowing, References & Slices

~14 min read · theory + drills
  • Lend data instead of giving it away. The borrow checker's two rules, mutable vs shared references, and slices as borrowed views into data.
Open module
06

Structs & Methods

~12 min read · theory + drills
  • Model your domain with structs, attach behavior with `impl`, and learn the difference between methods, associated functions and constructors.
Open module
07

Enums & Pattern Matching

~13 min read · theory + drills
  • Make illegal states unrepresentable. Enums carry data, `match` is exhaustive, and the compiler refuses to let you forget a case.
Open module
08

Option, Result & Error Handling

~15 min read · theory + drills
  • No null, no exceptions. Absence and failure are ordinary values the type system forces you to handle — plus `?`, custom error types and error conversion.
Open module
09

Collections & Strings

~15 min read · theory + drills
  • `Vec`, `HashMap`, `HashSet`, and the `String` vs `&str` split that trips up every newcomer — including what UTF-8 really means for indexing.
Open module
10

Modules, Crates & Project Layout

~13 min read · theory + drills
  • Organize a real project: the module tree, visibility, paths, workspaces, dependencies, and publishing a crate to crates.io.
Open module
11

Generics

~12 min read · theory + drills
  • Write code once for many types with zero runtime cost. Monomorphization, generic structs and functions, and trait bounds as requirements.
Open module
12

Traits & Trait Objects

~15 min read · theory + drills
  • Shared behavior without inheritance. Trait definitions, default methods, blanket impls, the orphan rule, and static vs dynamic dispatch.
Open module
13

Lifetimes

~13 min read · theory + drills
  • 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.
Open module
14

Closures & Iterators

~13 min read · theory + drills
  • Functional pipelines that compile down to hand-written loops. `Fn`/`FnMut`/`FnOnce`, laziness, adapters, and writing your own iterator.
Open module
15

Smart Pointers & Interior Mutability

~14 min read · theory + drills
  • `Box`, `Rc`, `RefCell`, `Deref` and `Drop` — how to build trees, graphs and shared state when a single owner is not enough.
Open module
16

Testing, Docs & Tooling

~13 min read · theory + drills
  • Unit, integration and documentation tests, plus clippy, rustfmt, benchmarks and a CI pipeline that keeps a crate honest.
Open module
17

Fearless Concurrency

~14 min read · theory + drills
  • Threads, channels and `Arc<Mutex<T>>` — and the `Send`/`Sync` traits that turn data races from a debugging nightmare into a compile error.
Open module
18

Async Rust

~13 min read · theory + drills
  • `async`/`await`, futures as state machines, the Tokio runtime, and the difference between concurrency and parallelism in practice.
Open module
19

Macros, Unsafe & FFI

~17 min read · theory + drills
  • Code that writes code with `macro_rules!` and derive macros, the five superpowers of `unsafe`, and calling C from Rust (and back).
Open module
20

Idioms, Performance & Capstones

~10 min read · theory + drills
  • Idiomatic API design, the anti-patterns to unlearn, profiling and optimization — then four full capstone projects to build from scratch.
Open module

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