Rust ยท Interactive Curriculum
Learn Rust Programming
From Ownership to Async
Learn the Rust programming language for free with 26 interactive lessons, browser practice, and a clear path through ownership, borrowing, lifetimes, traits, async/await, and macros.
1fn main() {2 println!("Hello, Rustacean! ๐ฆ");3}Why Learn Rust?
Discover the benefits of learning Rust and how it can enhance your programming skills.
Memory Safety
Learn how Rust's ownership system guarantees memory safety without a garbage collector.
Modern Tooling
Experience Rust's excellent documentation, package manager, and testing tools.
All Rust Lessons
Browse the full curriculum. Each lesson has a readable page you can link to and share.
Introduction to Rust
Learn Rust from scratch โ discover why Rust is popular, set up your environment, and write your first program as a beginner
Variables and Data Types
Master Rust variables, mutability, and data types including integers, floats, booleans, characters, and type annotations
Control Flow
Master Rust control flow with if expressions, loops, and the match statement for conditional logic and pattern matching
Functions in Rust
Learn how to define Rust functions with parameters, return types, and expressions โ the building blocks of every Rust program
Ownership & Borrowing
Rust ownership explained โ understand move semantics, borrowing rules, and how Rust guarantees memory safety without a garbage collector
Structs & Enums
Learn how to define Rust structs and enums to create custom data types, implement methods, and model your domain effectively
Pattern Matching
Master Rust's powerful pattern matching with match expressions, if let, and destructuring
Borrowing in Depth
Deep dive into Rust borrowing and references โ learn shared and mutable references, the borrow checker, and safe data access
Closures
Rust closures tutorial โ learn how closures capture variables, understand Fn, FnMut, and FnOnce traits, and use closures with iterators
Option and Result
Master Rust Option and Result types for handling absence and errors with combinators, the ? operator, and error propagation
Error Handling
Learn Rust error handling with the Result type, panic!, recoverable vs unrecoverable errors, and the ? operator for propagation
Collections
Learn to use Rust's standard collections including Vec, HashMap, and HashSet with iterators
Lifetimes
Rust lifetimes explained โ learn lifetime annotations, elision rules, and how the borrow checker validates reference validity
Traits & Generics
Learn to write flexible, reusable code with Rust's trait system and generic programming
Iterators
Master Rust's powerful iterator system to write expressive, efficient, and functional-style code
Strings and Text
Understand Rust's two string types, text manipulation, UTF-8 encoding, and common string operations
Modules and Crates
Learn how to organize Rust code with modules and manage dependencies using crates and Cargo
Concurrency
Learn safe concurrent programming in Rust with threads, message passing, and shared state
Smart Pointers
Understand Box, Rc, RefCell, and interior mutability patterns in Rust
Testing in Rust
Learn how to write unit tests, integration tests, and use Rust's built-in testing framework to ensure your code is correct
File I/O
Learn how to read from and write to files in Rust using std::fs and std::io traits
Macros
Learn how to use and create Rust macros for metaprogramming and code generation at compile time
Async/Await
Master asynchronous programming in Rust with async/await syntax, Futures, and the Tokio runtime
Serde and JSON
Learn how to serialize and deserialize data structures to and from JSON using the serde and serde_json crates
CLI and Args
Build command-line tools in Rust by parsing arguments, handling flags, and structuring real-world CLI applications
Capstone Project: CLI Todo App
Build a complete command-line todo application combining structs, enums, error handling, traits, and collections
Frequently Asked Questions
- Is this about the Rust language or the survival game?
- The language. LearningRust.org is a free, browser-based course for the Rust programming language, so you will work through ownership, borrowing, lifetimes, traits, and async Rust rather than crafting tools to survive the night.
- Is it really free?
- Yes, all of it. The curriculum, the worked examples, and the online playground cost nothing. You can open lesson one, run Rust in the browser, and go all the way to the capstone without paying or installing anything.
- Do I need to install Rust before I start?
- No. Both the lessons and the playground run your code in a secure browser sandbox, so you can get comfortable with the language first and worry about rustup, Cargo, and a local editor later.
- What is the best way to learn Rust?
- Get variables and functions down quickly, then slow down and really sit with ownership and borrowing, since that is where Rust asks the most of you. From there, build up through structs, enums, traits, collections, and error handling. Running small examples, breaking them on purpose, and reading what the compiler tells you is the fastest way through.