This is the last page before you install anything. It's about the course itself: the two ways each idea is explained, and what the exercises do with the code you type. It also says which parts of learning Rust happen on your own computer rather than in the browser.
Two explanations and your setup
Nearly every idea here is explained two ways, and you choose which one you see. Textbook is the exact version. It uses the proper words that Rust programmers and the official Rust manuals use. Plain English says all the same things for someone seeing them for the first time. It uses everyday words and explains each new term the moment it shows up. It isn't a cut-down version; nothing is left out. Flip between the two with the switch at the top of each explanation. The course remembers which one you picked.
Some steps depend on your computer, like how to open the window where you type commands. Those steps come in tabs, one tab per option. Tell the course about your setup once, in the My setup panel on the course page. It asks two things. First, which operating system you use: Windows, macOS, or Linux. Second, which editor you'll write Rust in. An editor is the app where you type code. The choices are RustRover, VS Code, Zed, or a plain text editor plus the command line, and Chapter 1 helps you choose. After that, every tabbed block opens on your choice.
Most ideas are explained twice, side by side. The Textbook lane is precise: it uses the correct terms and states each rule completely, the way the official documentation would. The Plain English lane makes the same claims for someone meeting the idea for the first time, in everyday words, and explains every term where it first appears. Neither lane is a summary of the other. A switch above each explanation flips between them. Your choice carries over as you move through the course.
Steps that differ by computer appear as tabs. You set the course's tab groups once, under My setup on the course page (or in Settings). One is your operating system: Windows, macOS, or Linux. The other is your editor, the app you'll write Rust in: RustRover, VS Code, Zed, or just a text editor plus the command line. Choosing a tab in any lesson changes it everywhere. If a block doesn't offer your choice, it opens on its own first tab and leaves your setting alone.
Here's a taste of an editor-tabbed block. Each tab says how you'll run a program once Chapter 1 has set that editor up.
RustRover is JetBrains' editor made just for Rust. It's free for
non-commercial use, which includes learning. A green Run arrow sits
beside fn main(); click it to build and run the program.
VS Code is a general-purpose editor. Chapter 1 adds the official Rust
extension, which puts a small Run link just above fn main().
Zed understands Rust without any add-ons. Chapter 1 shows how to run a program from inside Zed, including from the typing window built into it.
Any text editor plus a terminal (the typing window from the last section) works. You type one command to build and run the program. Every editor in the other tabs runs that same command for you behind its button.
Worked example
Setting up once
-
1
Ana has a Windows laptop and wants to try VS Code. On the course page she opens My setup and picks Windows and VS Code.
-
2
In Chapter 1, the install steps open straight on the Windows tab, and the "run your program" steps open on VS Code. She never hunts for her tab.
-
3
Later she's curious about Zed and clicks its tab in a lesson. From then on, every editor tab in the course opens on Zed, because picking a tab anywhere updates the setting everywhere.
-
4
One block covers only RustRover and the command line. It opens on its first tab, RustRover. Ana's Zed choice stays saved for the next block that has it.
Practice: Explanations and your setup (4 problems · doesn’t affect your progress)
Is Plain English a shortened version of the Textbook explanation?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Nothing is left out. It explains the hard parts in plainer words.
It's a full explanation, often a longer one.
Same idea, same claims, different wording.
Why
Plain English conveys everything Textbook does, in everyday language, explaining each term as it appears.
No: it says the same things in everyday words
Where do you tell the course your operating system and editor once?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Once is enough. Every tabbed block then follows your choice.
.rs files are for Rust code, not course settings.
cd moves between folders. It doesn't change course settings.
Why
My setup stores your operating system and editor, and tabbed blocks open on them.
My setup, on the course page
You click the Linux tab in a lesson, though My setup says macOS. What happens elsewhere?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Picking a tab anywhere updates the setting everywhere.
Nothing resets. Your new choice is saved.
It remembers the choice, so you don't have to.
Why
Choosing a tab in any lesson changes your saved setting, so every block in that group follows.
Every operating-system tab now opens on Linux
My setup says VS Code. A block offers only Zed and the command line. What do you see?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Blocks only show the tabs they were written with.
It still shows content, from its first tab.
Your saved choice is left alone.
Why
A block that can't match your choice opens on its first tab and leaves your setting alone.
The block's first tab, Zed; your VS Code setting stays saved
Checks, practice, and code exercises
You'll meet two kinds of question set. A check sits in the middle of a lesson. It picks a few questions at random from a bigger pool, so coming back later gives you different ones. Checks are marked. Your results help the course decide what to show you again for review later.
A practice set comes at the end of a part of a lesson. It's a short ladder of four to six problems that always come in the same order. The first asks about the idea itself. Then comes an easy one, a normal one, and one with a twist, and the last one hides a trap. Practice isn't marked. It's there because reading about something and doing it are different skills. Every chapter also finishes with a review page: practice drawn from all its lessons.
The code questions come in four flavors. In predict the output, you read a program and write down what it would print, line for line. In put the lines in order, you arrange mixed-up lines into the right order, and sometimes one line is a decoy that doesn't belong. In fill in the blanks, you supply the part of a program that's been left out. In a bug hunt, you get a program with mistakes planted in it, and you're told how many. A mistake in a program is called a bug. Sometimes you just click the broken lines. Other times you repair the code and press Check.
A check is a set of questions inside a lesson. It draws a few at random from a larger bank, so a revisit shows a different mix, and your answers are graded and feed your progress and review schedule. A practice set is a fixed ladder of four to six problems, in the same order every time. It opens with a question about the idea, then climbs through a basic case, a typical one, and a variation, and ends on a problem with a catch in it. Practice is ungraded. Each chapter ends with a review page of practice drawn from all of its sections.
Code exercises come in four kinds. Predict the output: read a program and type the exact text it prints. Put the lines in order: arrange shuffled lines into a working program or a correct sequence of commands, sometimes with a decoy line to leave out. Fill in the blanks: type the missing piece of a program. Bug hunt: a short program with a stated number of planted mistakes, called bugs. In spot mode you click the broken lines; in fix mode you edit the code in place and press Check.
Try one now. The program below uses only what the first section of this
chapter showed you: println! prints its quoted text on a line of its own. A line starting
with // is a comment the compiler skips.
Predict before you peek
Type exactly what this program prints, one line per line. The answer was produced by the real Rust compiler.
Loading interactive…
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
What this task checks
Structure checked automatically. Whether your ideas are convincing isn't graded, so reread with the checklist.
The compiler says
A model answer
Correct answer
Also accepted:
Why
Why
println! prints Ready. The next line starts with //, so it's a comment and Steady never prints. The last println! prints Go!.Worked example
Working a bug hunt in spot mode
-
1
A bug hunt says: this program has 1 mistake. Click the broken line.
fn main() { println!("Level 1 complete"); println!("Score: 450); println!("Loading level 2"); } -
2
The task gives the number of bugs, so you know when to stop looking. Check each line against what a correct one looks like: the
println!name, round brackets, text in a pair of double quotes, and a;at the end. -
3one flag per bug, then press Check
Line 3 opens a quote before
Scoreand never closes it. The compiler would keep reading, treating the rest of the file as text, and refuse to build the program. Click line 3.one flag per bug, then press Check
-
4
In fix mode, the same program would open in an editor. You'd add the missing
"after450and press Check, and the page would tell you whether the bug is gone and whether the code is still well-formed Rust.
Check your understanding (counts toward your progress)
How do the Textbook and Plain English explanations relate?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Plain English isn't a cut-down version. It says everything the Textbook lane says.
Both cover the same idea, just in a different voice.
Both are correct. They differ in wording, not in truth.
Why
The two lanes say the same things. Textbook uses exact terms; Plain English uses everyday words and explains each term as it arrives.
A countdown program. Type exactly what it prints.
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
What this task checks
Structure checked automatically. Whether your ideas are convincing isn't graded, so reread with the checklist.
The compiler says
A model answer
Why
Four println! lines, four lines of output, in order from the top.
Correct answer
Also accepted:
Why
Lines run top to bottom, one output line each.
Match each task to the kind of code exercise it describes.
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
What this task checks
Structure checked automatically. Whether your ideas are convincing isn't graded, so reread with the checklist.
The compiler says
A model answer
Why
Predicting output means typing what prints. Ordering sometimes includes a decoy to leave out. Blanks ask for a missing piece. Bug hunts come in spot (click) and fix (edit) modes.
Correct answer
Also accepted:
Why
A bug hunt has two modes: clicking and editing.
Practice: Checks, practice, and code exercises (5 problems · doesn’t affect your progress)
Which one feeds your progress and review schedule?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Practice is unmarked, so it doesn't feed the schedule.
Reading is important, but it isn't graded.
Visiting a page doesn't grade anything.
Why
Checks are marked, and those marks drive your progress and review.
A check
Predict the output of this tiny program.
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
What this task checks
Structure checked automatically. Whether your ideas are convincing isn't graded, so reread with the checklist.
The compiler says
A model answer
Why
Two lines print in order: Save, then Quit.
Correct answer
Also accepted:
Why
Save ⏎ Quit
Fill the blank so the program prints Track 7.
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
What this task checks
Structure checked automatically. Whether your ideas are convincing isn't graded, so reread with the checklist.
The compiler says
A model answer
Why
Quoted text prints exactly, so the blank is Track 7, capital and space included.
Correct answer
Also accepted:
Why
Track 7
Bug hunt, spot mode, 1 mistake. Click it.
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
What this task checks
Structure checked automatically. Whether your ideas are convincing isn't graded, so reread with the checklist.
The compiler says
A model answer
Why
Line 3 is missing its ;.
Correct answer
Also accepted:
Why
Order the lines into a program that prints Ready, then Go!, and skip the line that would print something extra.
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
What this task checks
Structure checked automatically. Whether your ideas are convincing isn't graded, so reread with the checklist.
The compiler says
A model answer
Why
Opening line, the two println! lines in order, closing brace. The Steady line is the decoy.
Correct answer
Also accepted:
Why
Only two lines should print.
What the page checks, and what your machine runs
When you type code into a question on this site, the site never runs your code. It doesn't even compile it. Your code goes to the course's server, and a Rust parser reads it. A parser is a program that reads code the way a grammar checker reads a sentence. It can tell whether each bracket has a partner, where each instruction ends, and whether you used the piece the question asked for. What it can't tell is what your code would do, just as a grammar checker can't tell whether a sentence is true. Rust's compiler also runs some deeper checks that the parser doesn't attempt. Later chapters rely on those a lot. That's why you'll also compile on your own computer.
So where do the outputs on the pages come from? Before a page is published, the course's build takes every example program and runs it through Rust's own compiler (release 1.98). Then it compares what the page shows with what really printed, and with every error message the compiler really gave. If anything differs, the page isn't published. No output here was typed in by a person.
Compiling and running your own code happens on your own computer, from Chapter 1 on. Starting in Chapter 4, every chapter ends with a lab. A lab is a ready-made Rust project folder you download and finish. It arrives with tests: small extra programs someone already wrote that check whether your code works. One command runs them all.
If you want to try a snippet without installing anything, there's the Rust Playground at play.rust-lang.org. It's a website run by the Rust project. You paste a short program into it and press Run. Its servers compile and run the program, and the output appears in your browser. It's handy for quick experiments. It's not the place for labs, though. The programs it runs can't reach the internet, and each one gets only a short time to finish.
Code you type into a lesson page is never compiled or run. It's sent to the course's server and examined by a Rust parser. A parser is a program that reads source code and works out its structure (which brackets pair up, where each instruction ends, which names are called) without translating or running it. That's how a check decides whether your answer is well-formed Rust and whether it uses what the task asked for. It also sets the limit: a parser knows the shape of your code, not what the code would do. It can't tell what a program would print, and it can't apply Rust's deeper checks, the ones only the real compiler performs.
So everything a page shows the compiler or a program doing was produced ahead of time. That covers the output under a snippet, the compiler's error message, and the answer key of a predict-the-output question. All of it was produced by the real Rust compiler (version 1.98) when the course was built, and the build fails if any page disagrees with what really happened. Nothing on a page is typed by hand.
Compiling and running is your machine's job, starting in Chapter 1. From Chapter 4, each chapter ends in a lab: a ready-made Rust project folder with its tests already written. Tests are small extra programs that check whether your code does its job, and one command runs them all on your machine. For trying a snippet without installing anything, the Rust Playground (play.rust-lang.org) is the Rust project's own website that compiles and runs short programs on its servers and shows the output in your browser. It's optional, it has no network access for the programs you run, and its run time is capped, so it's for small experiments, not for labs.
On this page, or on your machine?
Sort each activity by where it happens.
Loading interactive…
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
What this task checks
Structure checked automatically. Whether your ideas are convincing isn't graded, so reread with the checklist.
The compiler says
A model answer
Correct answer
Also accepted:
Why
Why
Worked example
Checked is not the same as run
-
1
A fill-in-the-blank question asks for the missing text in
println!("[[b1]]");so that the program printsLights on. Leo typesLights onand it's marked right. -
2
The page never ran Leo's program. The parser confirmed the line is well-formed Rust and the blank matches an accepted answer. Separately, when the course was built, the compiler ran the same program with that answer in place and got
Lights on. -
3the page checks; the compiler (yours or the Playground's) runs
Curious, Leo pastes the program into the Rust Playground and changes the text to
Lights off. He presses Run, and the Playground's servers compile and run it. NowLights offappears. That run happened on the Playground, not on the lesson page.the page checks; the compiler (yours or the Playground's) runs
-
4
From Chapter 1 he'll do the same on his own laptop, with the compiler installed locally, and from Chapter 4 he'll run each lab's tests there too.
Worked example
Trusting an output you didn't run
-
1
Chapter 1 shows a program next to the text it prints. How do you know it's right?
-
2
When the course was built, that program went through the real Rust compiler and was run. Then the build compared the printed text with the page, character by character. It would have refused to publish a page that differed.
-
3
The same goes for compiler error messages, like the missing
;in this chapter's first section: that message was produced by the compiler, not written from memory. -
4
If your own run ever differs, the difference is information. Check that your code matches the page character for character. Then check which version of Rust you installed. Later pages point out the few places where results legitimately vary from run to run.
Where this goes next
Chapter 1 §2 installs Rust on your machine. From Chapter 1 §3 on, you can compile and run every example yourself. Chapter 1 §5 sets up the editor you chose under My setup. Chapter 4 ends with the first lab. It's a calculator you build in a ready-made project and check against its tests. Every chapter after that ends with a lab too.
Check your understanding (counts toward your progress)
A fill-in-the-blank answer of yours is marked right. What does that prove?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
The page never runs your code, now or later.
The parser can't apply the compiler's deeper checks, and changes you make afterwards aren't checked at all.
Marking is exact. It compares your answer's shape with what the question accepts.
Why
Pressing Check parses your answer. Separately, the build compiled and ran the program with the accepted answer. Your own variations get compiled only on your machine.
Separate what happened when you pressed Check from what happened when the course was built.
What happens to Rust code you type into a lesson page's question?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Nothing on a lesson page compiles or runs your code.
The server doesn't compile it either. It only parses it.
The Playground is a separate website you can choose to visit. Lesson pages don't send your code there.
Why
Your answer is parsed: the server works out its structure and compares it with what the question asked for. Compiling and running happen only on your machine or in the Playground.
A parser reads code the way a grammar checker reads a sentence.
An output box under a snippet shows what the program printed. Where did that text come from?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
No output is typed by hand. The build would fail if the page and the real run disagreed.
Nothing runs in your browser. The output was captured beforehand.
A parser knows shape, not behavior. It can't tell what a program prints.
Why
Every output was produced by a real run at build time, and the build refuses to publish a page that doesn't match.
Nothing on a page is typed by hand, and nothing runs in your browser.
Sort each activity: does a lesson page do it, or does it need your machine (or the Playground)?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
What this task checks
Structure checked automatically. Whether your ideas are convincing isn't graded, so reread with the checklist.
The compiler says
A model answer
Why
The page grades shape and order and shows captured output. Compiling, running tests, and seeing your own program's output need a real compiler.
Correct answer
Also accepted:
Why
Does it need the real compiler, or just a look at the code's shape?
Practice: Checked on the page, run on your machine (5 problems · doesn’t affect your progress)
Does a lesson page ever run the code you type into a question?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Browsers here never run Rust.
The server parses your code but never compiles or runs it.
No question runs your code, whatever its difficulty.
Why
Your answers are parsed, never compiled or run.
No; a parser checks its shape
A compiler error shown on a lesson page came from where?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Nothing on a page is typed by hand, errors included.
The parser doesn't produce compiler messages.
Browsers here don't compile anything.
Why
Every error message on a page was produced by the real compiler at build time.
The real Rust compiler, when the course was built
Where does each happen?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
What this task checks
Structure checked automatically. Whether your ideas are convincing isn't graded, so reread with the checklist.
The compiler says
A model answer
Why
Shape checks and clicked answers are graded on the page. Running programs needs your machine or the Playground.
Correct answer
Also accepted:
Why
You want to see what a snippet prints if you change one word, and you haven't installed Rust yet. What can you do?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Lesson questions grade shape; they don't show your program's output.
The page's source won't run your changed snippet.
The review is practice, not a place to run code.
Why
The Playground compiles and runs short programs in your browser, without installing anything.
Paste it into the Rust Playground and press Run
Which of these can the page's parser NOT catch, but the compiler on your machine can?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
An unclosed quote breaks the shape, so the parser sees it.
Matching brackets is the parser's everyday job.
Where instructions end is part of the structure the parser works out.
Why
The parser checks shape. The compiler also runs deeper checks, which later chapters rely on, and those need a real compile.
A problem that only Rust's deeper checks find, beyond the code's shape