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.
- Hello, Rust! 24 min · Read, predict and practice
- Name and Change Values 24 min · Read, predict and practice
- Calculate with Whole Numbers 26 min · Read, predict and practice
- 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.
- Make Decisions 25 min · Read, predict and practice
- Repeat Work with for 25 min · Read, predict and practice
- Give a Calculation a Name 26 min · Read, predict and practice
- 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.
- Track Who Owns a String 28 min · Read, predict and practice
- Read Text Through a Borrow 27 min · Read, predict and practice
- Change Text Through a Borrow 28 min · Read, predict and practice
- 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.
- Grow a List with Vec 26 min · Read, predict and practice
- Group Related Fields in a Struct 26 min · Read, predict and practice
- Represent Alternatives with an Enum 26 min · Read, predict and practice
- 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.
- Handle a Value That May Be Missing 26 min · Read, predict and practice
- Turn Text into a Number with Result 28 min · Read, predict and practice
- Read Input from the Console 28 min · Read, predict and practice
- 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.
- Split a Program into Modules 26 min · Read, predict and practice
- Add Methods to a Struct 28 min · Read, predict and practice
- Check Behavior with Assertions 26 min · Read, predict and practice
- 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.
- Run the Study Planner 24 min · Read, predict and practice
- Trace a Request from Borrow to Owned Data 32 min · Read, predict and practice
- Prove the Planner’s Rules 24 min · Read, predict and practice
- Extend the Report and Run It Locally 26 min · Read, predict and practice
- On Your Own: A Reading Tracker 40 min · Independent checkpoint
- Come Back Later: Rust Recall Challenges 30 min · Extra delayed review