Rust by Example
The official MIT/Apache-2.0 tour of Rust by worked examples — primitives, custom types, flow control, closures, generics, traits, ownership, error handling, and collections. Drills lift each example's load-bearing function and let the learner fill it in.
- Rust
- 26 lessons
- ~5 hours
- Free
- by The Rust Project
Learn Rust for free on Libre Academy with the Rust by Example course: 26 interactive lessons you complete by writing real code in a built-in editor, graded instantly by hidden tests. No paywall, no sign-up. It's part of the free, open-source desktop app for macOS, Windows and Linux.
What you get
- Hands-on lessons with a real editor and instant, test-graded feedback.
- Free and open source, with no account required to start.
- Works offline in the free desktop app for macOS, Windows and Linux.
- Rust runs via a hosted playground.
What's inside
- Hello, World, Primitives, and Tuples
- Custom Types: Structs and Enums
- Flow Control: if/else, loops, and match
- Functions, Closures, and Higher-Order Functions
- Generics and Traits
- Ownership, Borrowing, and Lifetimes
- Error Handling: Option and Result
- Collections, Strings, and the Heap
Download to start Rust by Example → More free Rust courses
Helpful reading
Why passive video doesn't make you a programmer · Bring Your Own Book: turning any PDF into a course