Skip to content

Rust / Beginner · Free public pilot

Learn Rust in 7 Days

Write your first program, learn how Rust tracks ownership and finish with a tested study planner.

Start your first lesson →

Start from zero. Take your own time.

The 30 lessons assume no previous programming experience. Allow about 60–90 minutes per day for reading and hands-on practice. Split a day across sessions if you need more time.

Run Rust 2024 in your browser with code-playpad’s experimental compiler. The first Run downloads about 57 MB and caches the toolchain. Enter console input before pressing Run.

Each day ends with independent practice. Day 7 includes a multi-file project, an optional Cargo download and a review to try after a few days. Progress is saved in this browser.

Finished the study planner? Continue with Intermediate Rust →

Day 1 · About 99 minutes

Your First Rust Programs

Run a program, name values and calculate with whole numbers.

  1. Hello, Rust! 24 min · Read, predict and practice
  2. Name and Change Values 24 min · Read, predict and practice
  3. Calculate with Whole Numbers 26 min · Read, predict and practice
  4. Checkpoint: A Study Receipt 25 min · Independent checkpoint

Day 2 · About 101 minutes

Decisions, Loops and Functions

Write a function that applies a rule to a series of values.

  1. Make Decisions 25 min · Read, predict and practice
  2. Repeat Work with for 25 min · Read, predict and practice
  3. Give a Calculation a Name 26 min · Read, predict and practice
  4. Checkpoint: Minutes That Count 25 min · Independent checkpoint

Day 3 · About 111 minutes

Ownership and Borrowing

Predict when text moves, when it is borrowed and when it can change.

  1. Track Who Owns a String 28 min · Read, predict and practice
  2. Read Text Through a Borrow 27 min · Read, predict and practice
  3. Change Text Through a Borrow 28 min · Read, predict and practice
  4. Checkpoint: Edit and Show a Title 28 min · Independent checkpoint

Day 4 · About 106 minutes

Collections and Custom Types

Model study sessions with structs and enums, then summarize them from a vector.

  1. Grow a List with Vec 26 min · Read, predict and practice
  2. Group Related Fields in a Struct 26 min · Read, predict and practice
  3. Represent Alternatives with an Enum 26 min · Read, predict and practice
  4. Checkpoint: Count Only Completed Work 28 min · Independent checkpoint

Day 5 · About 112 minutes

Missing Values and Invalid Input

Use Option and Result to handle missing data and validate console input.

  1. Handle a Value That May Be Missing 26 min · Read, predict and practice
  2. Turn Text into a Number with Result 28 min · Read, predict and practice
  3. Read Input from the Console 28 min · Read, predict and practice
  4. Checkpoint: Validate a Duration 30 min · Independent checkpoint

Day 6 · About 108 minutes

Modules and Behavior Checks

Split a program into files and prove that invalid input leaves its state intact.

  1. Split a Program into Modules 26 min · Read, predict and practice
  2. Add Methods to a Struct 28 min · Read, predict and practice
  3. Check Behavior with Assertions 26 min · Read, predict and practice
  4. Checkpoint: Validate Before You Change State 28 min · Independent checkpoint

Day 7 · About 146 minutes

Build the Study Planner

Run, test and extend a multi-file planner, then build a reading tracker on your own.

  1. Run the Study Planner 24 min · Read, predict and practice
  2. Trace a Request from Borrow to Owned Data 32 min · Read, predict and practice
  3. Prove the Planner’s Rules 24 min · Read, predict and practice
  4. Extend the Report and Run It Locally 26 min · Read, predict and practice
  5. On Your Own: A Reading Tracker 40 min · Independent checkpoint
  6. Come Back Later: Rust Recall Challenges 30 min · Extra delayed review