Rust From Zero
Rust has a reputation that sounds like a contradiction: it's as fast as C, but it won't let you corrupt memory or crash on a stray pointer - and it proves that at compile time, before your program ever runs. For years languages made you pick: fast and dangerous, or safe and slow. Rust's whole reason for existing is to refuse that trade.
There's a second part to Rust's reputation, and it's also true: the learning curve is steep. The compiler will reject programs that look perfectly fine, with errors about "borrows" and "moves" and "lifetimes" that mean nothing to you yet. That's not you being bad at this. It's a genuinely new idea - ownership - that no mainstream language before Rust made you think about directly. Everyone hits this wall. The good news: it's one idea, it's learnable, and once it clicks, the compiler stops feeling like an enemy and starts feeling like a coworker who catches your bugs before they ship.
This guide takes you the whole way: from "I've never written a line of Rust" to understanding what the language is actually doing - ownership, yes, but also lifetimes, traits, smart pointers, concurrency, and the parts of Rust that make it fast. We go mental-model-first the whole way: before any command, you'll understand what the thing actually is and why Rust made the choice it did.
It's one zero-to-hero journey in two halves. Phases 1–9 are the basics - enough to read real Rust, structure a project, and reason about ownership instead of guessing. Phases 10–17 are the deep half - lifetimes, traits and generics, smart pointers, error handling, fearless concurrency, iterators, macros, and performance and unsafe, the stuff that separates "writes Rust" from "understands Rust." Each phase carries a difficulty badge so you can see the climb.
If you've never programmed at all, start with a gentler on-ramp first - Programming From Zero - then come back here. Rust is a hard first language; it's a great second one.
How to read this
- Brand new to Rust? Read 1–9 in order. Each phase builds on the last. Phases 1–5 give you the language and how to organize it. Then phase 6 - ownership - is the whole game. Come back for 10+ when the basics feel comfortable.
- Already know another language? Skim phases 1–5 to catch where Rust is deliberately different
(immutable by default, no
null, exhaustivematch, expressions everywhere), then really slow down at phase 6. Ownership is where Rust stops looking like a normal language and starts being Rust. - Past the basics already? Jump to the deep half - Phase 10: Lifetimes & the Borrow Checker onward is where ownership grows up into lifetimes, traits, and the zero-cost abstractions that make Rust fast.
The phases
Part 1 - The basics (🟢 Basic → 🟡 Intermediate)
- Install & Your First Program 🟢 -
rustup, andcargo run(not rawrustc). - Syntax, Values & Types 🟢 - immutable by default, static types with inference, shadowing.
- Collections 🟢 -
Vec<T>, arrays, theStringvs&strconfusion,HashMap. - Control Flow & Functions 🟢 -
if/matchas expressions, the loops, exhaustive matching. - Modules & Project Layout 🟢 -
Cargo.toml,main.rs/lib.rs,mod/pub/use, crates. - Ownership & Borrowing 🟡 - the whole point of Rust: owning, moving, borrowing, and the borrow checker.
- Errors & I/O 🟡 -
Result/Optioninstead of exceptions andnull, the?operator, files. - Ecosystem & Tooling 🟡 -
cargo test,cargo fmt,clippy, crates, the toolchain you get free. - Idioms & Gotchas 🟡 - how Rust programmers actually write Rust, and the traps that bite everyone once.
Part 2 - Beyond the basics (🔴 Advanced)
10. Lifetimes & the Borrow Checker, Deep 🔴 - what lifetime annotations mean, elision, and references in structs.
11. Traits & Generics, Deep 🔴 - trait bounds, associated types, impl vs dyn, static vs dynamic dispatch.
12. Smart Pointers & Interior Mutability 🔴 - Box, Rc/Arc, RefCell/Cell, Deref and Drop.
13. Error Handling, Deep 🟡 - ? in depth, custom error types, thiserror/anyhow, Option combinators.
14. Fearless Concurrency 🔴 - threads, Send/Sync, Arc<Mutex<T>>, channels, and a taste of async.
15. Closures, Iterators & Zero-Cost Abstractions 🟡 - Fn/FnMut/FnOnce, iterator adapters, free speed.
16. Macros & Metaprogramming 🟡 - macro_rules!, derive, and what procedural macros are for.
17. Performance, Unsafe & the Ecosystem 🔴 - zero-cost abstractions, when unsafe is justified, profiling, key crates.
Finale 18. Where to Go Next 🟢 - CLIs, web, systems, WebAssembly, and what to actually build.
Frameworks and big domains (
asyncruntimes, embedded, WebAssembly toolchains) are their own world - this guide makes the language make sense, top to bottom.