Free curriculum

Learn Rust, lesson by lesson

Build a reliable mental model of Rust, starting with expressions and control flow before ownership, borrowing, lifetimes, traits, concurrency, and production tooling.

The sequence deliberately introduces ownership before borrowing and lifetimes, then uses those foundations in async, I/O, and the final CLI project.

26 lessonsAbout 645 minutesThe runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.

Complete curriculum

Work in order, or open any lesson as a public reading reference. Interactive practice remains optional.

  1. Lesson 1 · basics · foundations

    What Is Rust? Beginner Guide

    What is Rust? Discover its speed and memory safety, then write and run your first Rust program in the browser. A free beginner lesson with no install.

    Read lesson →
    Position
    core · 15 min
    Prerequisites
    None
    Outcomes
    Syntax Fluency
    Runtime / version
    The runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.
  2. Lesson 2 · basics · foundations

    Variables and Data Types

    Master Rust variables, mutability, and data types including integers, floats, booleans, characters, and type annotations

    Read lesson →
    Position
    core · 20 min
    Prerequisites
    None
    Outcomes
    Syntax Fluency
    Runtime / version
    The runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.
  3. Lesson 3 · basics · foundations

    Control Flow

    Master Rust control flow with if expressions, loops, and the match statement for conditional logic and pattern matching

    Read lesson →
    Position
    core · 25 min
    Prerequisites
    None
    Outcomes
    Syntax Fluency
    Runtime / version
    The runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.
  4. Lesson 4 · basics · foundations

    Functions in Rust

    Learn how to define Rust functions with parameters, return types, and expressions — the building blocks of every Rust program

    Read lesson →
    Position
    core · 15 min
    Prerequisites
    None
    Outcomes
    Syntax Fluency
    Runtime / version
    The runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.
  5. Lesson 5 · intermediate · ownership

    Ownership & Borrowing

    Rust ownership explained — understand move semantics, borrowing rules, and how Rust guarantees memory safety without a garbage collector

    Read lesson →
    Position
    core · 25 min
    Prerequisites
    Variables and Data Types, Functions in Rust
    Outcomes
    Performance & Runtime, Security & Robustness
    Runtime / version
    The runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.
  6. Lesson 6 · intermediate · modeling

    Structs & Enums

    Learn how to define Rust structs and enums to create custom data types, implement methods, and model your domain effectively

    Read lesson →
    Position
    core · 20 min
    Prerequisites
    Variables and Data Types, Functions in Rust, Ownership & Borrowing
    Outcomes
    Data Modeling, Abstraction & Design
    Runtime / version
    The runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.
  7. Lesson 7 · intermediate · modeling

    Pattern Matching

    Master Rust's powerful pattern matching with match expressions, if let, and destructuring

    Read lesson →
    Position
    core · 25 min
    Prerequisites
    Structs & Enums, Control Flow
    Outcomes
    Syntax Fluency, Data Modeling
    Runtime / version
    The runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.
  8. Lesson 8 · intermediate · ownership

    Borrowing in Depth

    Deep dive into Rust borrowing and references — learn shared and mutable references, the borrow checker, and safe data access

    Read lesson →
    Position
    core · 25 min
    Prerequisites
    Ownership & Borrowing
    Outcomes
    Architecture & Maintainability, Performance & Runtime
    Runtime / version
    The runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.
  9. Lesson 9 · intermediate · ownership

    Closures

    Rust closures tutorial — learn how closures capture variables, understand Fn, FnMut, and FnOnce traits, and use closures with iterators

    Read lesson →
    Position
    core · 25 min
    Prerequisites
    Functions in Rust, Ownership & Borrowing
    Outcomes
    Abstraction & Design, Syntax Fluency
    Runtime / version
    The runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.
  10. Lesson 10 · intermediate · reliability

    Option and Result

    Master Rust Option and Result types for handling absence and errors with combinators, the ? operator, and error propagation

    Read lesson →
    Position
    core · 25 min
    Prerequisites
    Structs & Enums, Pattern Matching
    Outcomes
    Security & Robustness, Abstraction & Design
    Runtime / version
    The runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.
  11. Lesson 11 · intermediate · reliability

    Error Handling

    Learn Rust error handling with the Result type, panic!, recoverable vs unrecoverable errors, and the ? operator for propagation

    Read lesson →
    Position
    core · 20 min
    Prerequisites
    Functions in Rust, Structs & Enums, Option and Result
    Outcomes
    Security & Robustness, Architecture & Maintainability
    Runtime / version
    The runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.
  12. Lesson 12 · intermediate · modeling

    Collections

    Learn to use Rust's standard collections including Vec, HashMap, and HashSet with iterators

    Read lesson →
    Position
    core · 25 min
    Prerequisites
    Variables and Data Types, Ownership & Borrowing, Closures
    Outcomes
    Data Structures & Algorithms, Abstraction & Design
    Runtime / version
    The runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.
  13. Lesson 13 · intermediate · ownership

    Lifetimes

    Rust lifetimes explained — learn lifetime annotations, elision rules, and how the borrow checker validates reference validity

    Read lesson →
    Position
    core · 30 min
    Prerequisites
    Ownership & Borrowing, Borrowing in Depth
    Outcomes
    Architecture & Maintainability, Performance & Runtime
    Runtime / version
    The runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.
  14. Lesson 14 · intermediate · abstraction

    Traits & Generics

    Learn to write flexible, reusable code with Rust's trait system and generic programming

    Read lesson →
    Position
    core · 30 min
    Prerequisites
    Structs & Enums, Functions in Rust
    Outcomes
    Abstraction & Design
    Runtime / version
    The runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.
  15. Lesson 15 · intermediate · abstraction

    Iterators

    Master Rust's powerful iterator system to write expressive, efficient, and functional-style code

    Read lesson →
    Position
    core · 25 min
    Prerequisites
    Collections, Ownership & Borrowing, Traits & Generics, Closures
    Outcomes
    Abstraction & Design, Data Structures & Algorithms
    Runtime / version
    The runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.
  16. Lesson 16 · intermediate · modeling

    Strings and Text

    Understand Rust's two string types, text manipulation, UTF-8 encoding, and common string operations

    Read lesson →
    Position
    core · 25 min
    Prerequisites
    Ownership & Borrowing, Borrowing in Depth, Iterators
    Outcomes
    Data Modeling, Syntax Fluency
    Runtime / version
    The runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.
  17. Lesson 17 · intermediate · composition

    Modules and Crates

    Learn how to organize Rust code with modules and manage dependencies using crates and Cargo

    Read lesson →
    Position
    core · 25 min
    Prerequisites
    Functions in Rust, Structs & Enums, Iterators
    Outcomes
    Architecture & Maintainability, Production Delivery
    Runtime / version
    The runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.
  18. Lesson 18 · intermediate · abstraction

    Concurrency

    Learn safe concurrent programming in Rust with threads, message passing, and shared state

    Read lesson →
    Position
    core · 30 min
    Prerequisites
    Ownership & Borrowing, Borrowing in Depth, Error Handling, Closures
    Outcomes
    Performance & Runtime, Security & Robustness
    Runtime / version
    The runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.
  19. Lesson 19 · intermediate · ownership

    Smart Pointers

    Understand Box, Rc, RefCell, and interior mutability patterns in Rust

    Read lesson →
    Position
    core · 30 min
    Prerequisites
    Ownership & Borrowing, Borrowing in Depth, Traits & Generics
    Outcomes
    Performance & Runtime, Abstraction & Design
    Runtime / version
    The runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.
  20. Lesson 20 · intermediate · reliability

    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

    Read lesson →
    Position
    core · 25 min
    Prerequisites
    Functions in Rust, Error Handling, Modules and Crates
    Outcomes
    Testing & Debugging
    Runtime / version
    The runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.
  21. Lesson 21 · intermediate · composition

    File I/O

    Learn how to read from and write to files in Rust using std::fs and std::io traits

    Read lesson →
    Position
    core · 25 min
    Prerequisites
    Error Handling, Strings and Text, Modules and Crates, Testing in Rust
    Outcomes
    Production Delivery, Security & Robustness
    Runtime / version
    The runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.
  22. Lesson 22 · advanced · abstraction

    Macros

    Learn how to use and create Rust macros for metaprogramming and code generation at compile time

    Read lesson →
    Position
    core · 25 min
    Prerequisites
    Functions in Rust, Pattern Matching, Modules and Crates
    Outcomes
    Abstraction & Design, Syntax Fluency
    Runtime / version
    The runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.
  23. Lesson 23 · advanced · abstraction

    Async/Await

    Master asynchronous programming in Rust with async/await syntax, Futures, and the Tokio runtime

    Read lesson →
    Position
    core · 25 min
    Prerequisites
    Iterators, Traits & Generics, Error Handling, File I/O
    Outcomes
    Performance & Runtime, Abstraction & Design
    Runtime / version
    The runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.
  24. Lesson 24 · advanced · composition

    Serde and JSON

    Learn how to serialize and deserialize data structures to and from JSON using the serde and serde_json crates

    Read lesson →
    Position
    core · 25 min
    Prerequisites
    Structs & Enums, Pattern Matching, Error Handling, Modules and Crates
    Outcomes
    Production Delivery, Data Modeling
    Runtime / version
    The runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.
  25. Lesson 25 · advanced · delivery

    CLI and Args

    Build command-line tools in Rust by parsing arguments, handling flags, and structuring real-world CLI applications

    Read lesson →
    Position
    core · 25 min
    Prerequisites
    Option and Result, Strings and Text, Error Handling, Iterators, Lifetimes
    Outcomes
    Production Delivery, Security & Robustness
    Runtime / version
    The runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.
  26. Lesson 26 · advanced · capstone

    Capstone Project: CLI Todo App

    Build a complete command-line todo application combining structs, enums, error handling, traits, and collections

    Read lesson →
    Position
    capstone · 35 min
    Prerequisites
    Error Handling, Collections, Traits & Generics, Closures
    Outcomes
    Architecture & Maintainability, Production Delivery, Data Modeling
    Runtime / version
    The runner compiles with rustc using Rust 2021 edition; lessons call out narrower version requirements.