About

learnrust.net is a free, structured course for learning the Rust programming language. It starts at the very beginning, with what a program even is, and moves one short lesson at a time through everything you need to write real Rust: ownership, borrowing, traits, generics, error handling, and the rest. Nothing is assumed, nothing is hand-waved, and every example compiles as shown.

Learning to program takes time and practice. The job of this site is to make sure none of that effort is wasted on confusion: each lesson builds on the last, so the path from zero to competent is laid out in order, and you always know what to read next.

Completely free

Every lesson on this site is free, for everyone, all the time. There is no account to create, no trial that runs out, no locked "premium" chapters, no "unlock the rest for $29.99", and no newsletter standing between you and the next lesson. You can read the whole thing anonymously, start to finish.

If the site ever shows a few ads, it will be to cover hosting costs, and the lessons will stay free either way.

How this course is different

The standard advice for learning Rust is to assemble your own curriculum: read the official book, do exercises somewhere else, then go find a project to apply it all to. Each of those pieces is good, but the seams between them are where learners get lost. This site is a single ordered path instead: one place, one sequence, nothing to assemble.

The course also takes its time getting to ownership and borrowing. Rust's hardest ideas are introduced only after you can already write complete, useful programs, so that by the time the borrow checker starts enforcing its rules, the compiler's error messages feel like a familiar tool rather than a wall. Reading those messages is treated as a skill to learn in its own right, not a misfortune to endure.

Finally, "every example compiles as shown" is checked by machine, not by hope. Every program in every lesson is compiled and run against the current Rust toolchain before publication, and every terminal transcript on this site is real captured output.

Who this course is for

This course is for both complete beginners and experienced programmers, and it takes both audiences seriously.

If you have never programmed before, the early chapters were designed for you. Terms are defined when they are introduced, lessons take one concept at a time, and quizzes in nearly every lesson let you check that things stuck before you move on. Rust is an unusual but excellent choice for a first language, and this course assumes nothing except that you can use a computer.

If you have been programming for years, this is not just a quick syntax tour. Rust has a way of reopening questions you thought were settled: where values live, who owns them, when they go away, what a reference actually promises. Working through those questions from the ground up is worth it even for veterans, and you can skim the parts you already know. I can vouch for that personally, which brings me to the next section.

Inspired by learncpp.com

This site is openly modeled on learncpp.com, and that deserves more than a footnote.

I went through learncpp.com with about four years of programming experience, and I loved it. I expected to skim. Instead it pulled me back down to the fundamentals and showed me how much nuance I had been coasting past for years. It made me a better programmer, not just a person who knew more C++. And while it did that for me as an experienced developer, it is also one of the few resources I would hand to a complete beginner without hesitation. That combination is rare, and it is exactly what I want this site to be for Rust.

So the structure here is borrowed deliberately: short sequential lessons, best-practice boxes that tell you the recommended way rather than just the possible ways, warnings on the footguns, and quizzes that make you actually write code. If learnrust.net does for Rust what learncpp.com does for C++, it will have done its job.

Found a mistake?

A typo, an example that doesn't compile, an explanation that left you more confused than it found you: reports like these are the fastest way this site gets better. Email me at content@learnrust.net and include the URL of the lesson.

FAQ

Do I need to install anything to start? No. Chapter 0 walks you through installing Rust when the time comes, and until then you can run any example in the official Rust Playground right in your browser.

Should I read the lessons in order? Yes. Lessons build on each other, and later ones assume you have read the earlier ones. If you are experienced, skim rather than skip.

Is the course finished? Not yet. It is being written and published chapter by chapter, and the table of contents on the homepage always shows what is live.