Rust for Beginners: Build a Word Game · 00 · welcome

[ 00 · welcome ] [ free · always ] [ setup · the test loop ] [ ~20 min if you have programmed · ~30 if you have not ]
00

The toolchain, and a game worth building

[ preview ] The lesson is free to read — building it needs a free account.

You'll set up: Rust, the sboot command, and your own copy of the game — then watch your machine pass a real test before you write a line of code. No Rust yet; that starts in lab 01. About ten minutes on a new Mac or Linux box, most of it downloads, and longer on Windows, where the linker below is a large one-time download; about a minute if Rust is already installed.

The promise

You are going to build a game. A real one: it keeps a secret five-letter word, you get six guesses, and after each guess it tells you — letter by letter — how close you came. By the end of this course it picks a fresh word every game, refuses words it does not know, remembers which letters you have tried, and you can hand it to a friend and watch them play. Every lab adds one visible piece of it, and every lab ends with the game doing something it could not do before.

Along the way, and only when the game needs it, you learn the floor Rust stands on: variables, functions, choices, loops, strings, lists, and — later — types of your own. One habit sits on top of them, and it is what this whole course grades by: writing a small test that proves your code does what you meant. You write the code, you run it, and what your own run prints is the evidence.

Who this course is for

Assumed: you can use a terminal — change into a folder, run a command, read what it printed — you have installed software before, and you can edit a text file. That is the whole list.

Not assumed: any programming experience at all. If words like "variable" and "function" are new to you, or half-remembered from long ago, you are exactly who this course was written for. Every idea is taught here, at the moment the game needs it.

Wrote code once, years ago? Stay here. Skim each lesson — the ideas will be familiar; the Rust spelling is what is new — then work from the project's numbered steps: each hands you the function's frame, and later labs point at where you wrote that shape before. Check the Grading table at the bottom of each lab for the exact test names, and let sboot test and sboot hint tell you what is missing. Labs 01 and 02 go quickly; from lab 03 on, you write most of the game yourself.

If you already write code in another language this will feel slow — start at rust-for-systems instead; this course ends at that one's doorstep, so nothing is lost either way.

How a lab is graded

You read and decide here; you build in your terminal.

  • sboot test grades your work on your own machine, as often as you like. It is how you find out what to fix.
  • sboot submit records the official result with us — the same checks, our computation. It comes back with a link to your code review — written by the course's AI reviewer over your diff; reading that page and pressing Complete on it is what finishes a lab and opens the next.

Every check this course grades is published on the lab page before you run it. There is no hidden second list waiting at submit: what you practise against is exactly what you are graded on.

One toolchain, three operating systems

Windows, macOS and Linux are equals here. The game reads a line of text and prints text back, which works the same way everywhere, so there is no step that only works on one kind of machine. What you install today is rustup, the official Rust installer; after today the course asks for nothing else, and the game itself never needs an add-on library.

One thing rustup does not bring, and a brand-new machine usually does not have: the linker — the system tool that turns compiled Rust into a program you can run. It is a one-time install, it is different on each of the three systems, and step 4 of the project spells out yours before it can stop you.

Your code stays yours

The folder sboot start unpacks is yours — plain files and, if git is on your machine, a local git repo you can push anywhere, or nowhere. We hold no GitHub credential and never touch your remote repo: gh, git and sboot only ever run on your machine. sboot submit uploads your source and what your test run printed; what we keep afterwards is the verdict — your progress record — and the diff your code review was written on, not a copy of your repo.

New machine, months from now? Install sboot, run sboot login, then sboot resume with your folder's path or your repo's address. It fetches what a fresh copy is missing and runs this lab again: the same proof it gives you today.

That's the lesson — free to read. Create a free account to build it: the brief, the grading table and the hint ladder are on the Lab tab.

Create a free account →

Free to start · no credit card · Rust for Beginners is free

The brief, the grading table and the hint ladder live here.

Create a free account to unlock this lab.

Create a free account →

Free to start · no credit card · Rust for Beginners is free

Chat with Guru about the check that is failing you — the written hint ladder on the Lab tab is free and unlimited either way.

Create a free account to unlock this lab.

Create a free account →

Free to start · no credit card · Rust for Beginners is free

Your submitted diff lands here with comments on the exact lines.

Create a free account to unlock this lab.

Create a free account →

Free to start · no credit card · Rust for Beginners is free