Complete course
Learn Rust—don't be an otter.
A step-by-step guide to mastering the most effective way to use memory.
Your progress
0%Haven't you started yet?
— 3 lessonsBefore RustOptional
An optional start if you need a refresher on terminals, variables, functions and compilation.
00 4 lessonsSetup and mental model
Install Rust, meet Cargo and understand the kind of problems the language is built to solve.
01 4 lessonsSyntax and control flow
Variables, types, expressions, functions and the structures used in every program.
- 1.1Variables, mutability and types
- 1.2Expressions and functions
- 1.3Conditions and loops
- 1.4Basic macros
02 4 lessonsOwnership and borrowing
Make memory visible to understand moves, Copy, Clone, references and borrowing.
- 2.1Ownership and moves
- 2.2References and borrowing
- 2.3Slices, String and UTF-8
- 2.4Designing signatures with ownership
03 4 lessonsStructs, enums and patterns
Model valid states with types and exhaustive pattern matching.
- 3.1Structs, methods and Self
- 3.2Data-carrying enums and Option
- 3.3Exhaustive pattern matching
- 3.4Making invalid states impossible
04 4 lessonsCollections, text and errors
Work with real data and handle absence, failure and UTF-8 text explicitly.
- 4.1Vectors and maps
- 4.2String, str, bytes and chars
- 4.3Option, Result and the ? operator
- 4.4Error design
05 4 lessonsCrates, testing and documentation
Organize a codebase, define its API and prove that it keeps working.
- 5.1Modules, crates and visibility
- 5.2Dependencies, SemVer and features
- 5.3Unit, integration and doc tests
- 5.4rustdoc, Clippy and CI
06 4 lessonsTraits, generics and iterators
Build abstractions without losing control over types, costs or behavior.
- 6.1Traits and bounds
- 6.2Generics, impl Trait and dyn Trait
- 6.3Closures and captures
- 6.4Iterators and composition
07 4 lessonsI/O and CLI applications
Read, transform and write data in a maintainable terminal application.
- 7.1Arguments, input and output
- 7.2Files, paths and buffers
- 7.3Serde and configuration
- 7.4Designing a testable CLI
08 4 lessonsSmart pointers and interior mutability
Choose Box, Rc, Arc, Cell or RefCell for their guarantees, not by habit.
- 8.1Box, Deref and Drop
- 8.2Rc, Arc and Weak
- 8.3Cell, RefCell, Mutex and RwLock
- 8.4Trees, graphs and arenas
09 4 lessonsConcurrency and async
Transfer ownership between tasks and design concurrency with clear boundaries.
- 9.1Threads and channels
- 9.2Send, Sync and shared state
- 9.3Futures and async/await
- 9.4Cancellation and backpressure
10 4 lessonsIdiomatic Rust and API design
Move from making it compile to designing APIs that express invariants.
- 10.1Types that express invariants
- 10.2Builders and typestate
- 10.3Composition and patterns
- 10.4Designing a public API
11 4 lessonsUnsafe, FFI and no_std
Understand the obligations that appear when you step outside safe guarantees.
- 11.1Unsafe contracts
- 11.2Raw pointers and layout
- 11.3Safe FFI with C
- 11.4core, alloc and no_std