Rust Course
Ownership, borrowing, structs and enums, Option/Result, collections, traits and generics, lifetimes, closures and iterators, fearless concurrency, and testing — zero to hero with a CLI capstone.
- Step 1
Why Rust, and Cargo Basics
Rust promises memory safety without a garbage collector — find out how, and meet the tool that makes every Rust project feel the same.
Read lesson - Step 2
Variables, Mutability & Scalar/Compound Types
In Rust, every variable is locked by default — you must ask permission to change it, and that rule alone prevents a whole category of bugs.
Read lesson - Step 3
Ownership: Moves, Copy vs Clone
Rust's boldest idea is that every value has exactly one owner — understanding what happens when that owner changes unlocks the rest of the language.
Read lesson - Step 4
References & Borrowing
Moving a value every time you use it would make Rust unbearable — references let you borrow access without taking ownership, compiler-enforced for free.
Read lesson - Step 5
Structs & Methods (impl blocks)
Structs group related data into named fields, and impl blocks attach behavior to that data — Rust's answer to a class, without any inheritance.
Read lesson - Step 6
Enums & Pattern Matching
Rust enums let each variant carry its own data, and match forces you to handle every single one before your code will even compile.
Read lesson - Step 7
Error Handling: Option, Result, ?, panic!
Option handles values that might be absent, Result handles operations that might fail, and the ? operator lets you propagate either one cleanly.
Read lesson - Step 8
Collections: Vec, String, HashMap
Vec, String, and HashMap are the three collections you'll reach for constantly — and each one hides a gotcha worth understanding early.
Read lesson - Step 9
Traits & Generics
Traits describe shared behavior across unrelated types, and generics let one function work over all of them without sacrificing speed.
Read lesson - Step 10
Lifetimes
Lifetimes never make anything live longer — they're how you describe a relationship between references that the compiler already enforces.
Read lesson - Step 11
Closures & Iterators
Closures come in three flavors — Fn, FnMut, FnOnce — and iterator chains stay lazy until consumed, yet compile as fast as a hand-written loop.
Read lesson - Step 12
Modules, Crates & Workspaces
mod, pub, and use turn a growing Rust project into one with a deliberate internal API, and Cargo workspaces extend that same discipline across multiple crates.
Read lesson - Step 13
Smart Pointers: Box, Rc, and RefCell
Regular references only borrow — smart pointers own, count, and sometimes move borrow checks from compile time to runtime, unlocking shapes types alone can't describe.
Read lesson - Step 14
Fearless Concurrency: Threads, Channels, and Arc<Mutex<T>>
Rust lets you write multi-threaded code without dread, because the same ownership rules that stop use-after-free bugs also stop data races — at compile time.
Read lesson - Step 15
Testing in Rust
Rust bakes a test runner into the toolchain, so a test is just a function with one attribute above it — no framework, no config file.
Read lesson - Step 16
Capstone: A Word-Frequency CLI Tool
Every idea from this course — ownership, Result, HashMap, iterators — converges into one small, real program that reads text, counts words, and reports the ones that matter.
Read lesson