Course › Before Week 1 · 5 min
Day 0: Set up Rust
Install the toolchain, an editor that understands Rust, and Rustlings. 30 minutes.
Three things to install, about 30 minutes in total: rustup (it installs the compiler and cargo, and keeps them updated), an editor that understands Rust, and Rustlings, the small exercises you will do every day next to the lessons.
Every program in this course was compiled with Rust 1.100 and the 2024 edition, and every compiler message and program output on the site was recorded from it. A newer Rust compiles the same code; a compiler message may be worded a little differently.
Install Rust
On macOS and Linux, one command. It asks one question; press Enter for the default install.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
On Windows, download rustup-init.exe from rustup.rs and follow the prompts; it will also ask you to install the Visual Studio C++ build tools.
Open a new terminal so it picks up the new PATH, then check:
rustc --version
cargo --version
rustc 1.100.1 (20ddd0171 2026-11-25)
cargo 1.100.1 (3acc79c0c 2026-11-05)You now have rustc (the compiler), cargo (the build tool and package manager, like Composer and Artisan in one), rustfmt (cargo fmt, the formatter) and clippy (cargo clippy, a linter that knows thousands of mistakes).
Updating later is one command: rustup update.
An editor that understands Rust
Rust’s compiler catches a lot, and you want to see its messages while you type, not only when you build. That comes from rust-analyzer, the official language server.
| Editor | What to install |
|---|---|
| VS Code | The rust-analyzer extension (by The Rust Programming Language). Nothing else. |
| RustRover | JetBrains’ Rust IDE, free for non-commercial use. Feels like PhpStorm. Rust support is built in. |
Turn on format on save: in VS Code, set "editor.formatOnSave": true for Rust files. Rust code has one standard style, and you never argue about it again.
Hover any variable to see its type. In Rust that matters: half of the early questions you will have are answered by hovering.
Install Rustlings
Rustlings is a set of about 90 small broken programs, maintained by the Rust team. You fix them one by one while a watcher re-checks your code on every save. Each lesson tells you which ones to do that day.
cargo install rustlings
rustlings init
cd rustlings
rustlings
rustlings init creates a rustlings/ folder with all the exercises. Running rustlings inside it starts the watcher: it shows the current exercise, the compiler error, and moves on when you fix it.
Keep this folder; the exercise files are numbered by topic (exercises/01_variables, exercises/06_move_semantics…), and the lessons name them that way.
The book you will read alongside
Each lesson is short on purpose. The longer explanations live in The Rust Programming Language (“the Book”), written by the Rust team and free online. Each lesson tells you which chapter to read.
| Version | Why |
|---|---|
| The Book | The official text, updated for the 2024 edition. Also offline: rustup doc --book. |
| The Book, Brown University edition | The same text with ownership diagrams and short quizzes. Use this one for Week 1, especially Day 3 and Day 4. |
How to study each day
RuleNever copy and paste a program from this site. Type it, break it on purpose, and read what the compiler says.
Rust’s compiler is unusually helpful: it explains the problem, points at the line, and often prints the fix. Learning to read its messages is half of learning Rust, and you only learn it by seeing many of them.
Every error message on this site is real: each program was compiled with cargo, and the site shows exactly what it printed. If you type the same code, you will see the same error.
From Day 1 on
Run cargo fmt and cargo clippy before every commit. Put every tool you build in its own GitHub repository with a short README: by the end of Week 5 you will have four.
Ready: Day 1 creates your first project with cargo.