Start here¶
Level: 101 · for newcomers
One line: Three free resources cover the whole of beginning Rust between them — The Book to understand, Rust by Example to look things up, rustlings to type — and they are foundational because they fail in three different ways, so each one covers what the other two cannot.
The plan¶
If you do nothing else on this page, do this:
- Read The Book, chapters 1–10. Not 11–21 yet. Chapters 1–10 are the language; the rest is application.
- Run rustlings alongside it, from the start. Its own README recommends exactly this pairing, and there is a chapter-by-chapter mapping so you always know which exercises you are ready for.
- Keep Rust by Example open in a tab for the moments you want "what does that syntax do" rather than a chapter.
- Then read The Book again — the second time at the Brown University edition, which is the same text with quizzes built around the misunderstandings readers actually have.
- Then write something. That is what the practice tree and the katas are for.
Steps 1–3 happen together, not in sequence. Step 4 is the one nobody does and the one that pays most.
A fourth, if you want the order decided for you. Comprehensive Rust is Google's four-day class, published as a book — the only resource here written to be taught, so every slide carries a duration and a block of speaker notes. Use it as the spine and The Book for the parts it moves past in five minutes; its page here maps every chapter onto this library, and says which two things it has that this library does not.
Before any of that, or instead of it if you are still deciding: Benefits of Rust takes the twenty selling points Google's course opens with and says what the evidence is behind each one — which are compiler refusals, which are run-time behaviours you can watch, and which six are narrower than the one-line version. If you already write C or C++, read it beside C and C++, which compiles and runs the nine bugs those refusals are a reply to. Its counterpart, Measured claims, takes the other famous list — the six things Rust is said to do measurably well — and asks what each number actually counted; two of the six you can print on your own machine, and one of them is not a measurement at all.
Why these three¶
They are not three ranked options where you pick the best. They are three different kinds of resource, and the reason to use all three is that each one's weakness is another one's whole purpose:
| Gives you | Fails at | So pair it with | |
|---|---|---|---|
| The Book | the model — why ownership exists, what the compiler is protecting | making you type; you can read it all and write nothing | rustlings |
| Rust by Example | the syntax, runnable and editable in the page | the model — it shows what, rarely why | The Book |
| rustlings | the reps — the compiler as teacher, in small doses | breadth and depth; it is drills, not understanding | The Book |
| Comprehensive Rust | the order — a four-day syllabus with a duration and an instructor's notes on every slide | depth without the instructor; a slide is the visible half of a lesson | The Book |
Reading only The Book produces someone who can explain the borrow checker and freezes at an empty main. Doing only rustlings produces someone who can fix other people's programs. Only Rust by Example produces someone who knows the syntax for a thing without knowing when to want it.
And all three are free, official or semi-official, and maintained. The Book and Rust by Example ship with your toolchain — rustup doc --book works offline — and rustlings lives under rust-lang/. That matters more than it sounds: none of them will quietly rot, and none of them is trying to sell you a course.
Should this folder shadow the rest of the library?¶
No — and you were right to be suspicious. The redundancy is real, not hypothetical: 10_Resources/books already lists all three of these.
The failure mode is specific. Two copies of the same recommendation drift the moment one is edited, nothing in CI compares them, and a reader who finds the stale one has no way to know. This library has machinery that prevents exactly that for code — run_examples.py ↗ fails the build when a page and its output disagree — and no machinery at all for prose. So prose duplication has to be prevented by structure instead.
The rule this section follows, which is the one the rest of the repo already follows:
One owner per fact. Everything else links to it.
Concretely, the two sections have different jobs and do not overlap:
00_Start_Here/— the path. One recommended order, for one situation (you are starting), with the three resources explained in depth. Opinionated and short.10_Resources/— the shelf. Everything, sorted by situation, for someone browsing. Comprehensive and neutral.
So 10_Resources/books now says one line about each of these three and points here, rather than repeating the argument. If you ever find the same claim made twice in this repo, that is a bug — the fix is to delete one and link it.
This is the same reason OPTION.md, SHADOWING.md and TOOLCHAIN.md are maps rather than folders: they sequence pages that live somewhere else, and own nothing.
And where this library fits¶
Nothing here replaces The Book, and this section exists partly to say so. What this library adds is the thing a general-purpose book cannot: every claim backed by a program that CI compiles, runs, and diffs against a recorded answer, plus an "If you are coming from another language" section on every page — which, if you already write Python or ABAP, is usually the fastest route in.
Use it as the third voice. When The Book's explanation has not landed and rustlings has told you only that you are wrong, a page here has the same idea from a different angle with the output proved.
See also¶
- The Book · Rust by Example · rustlings
- Benefits of Rust — the twenty claims, sorted by the kind of evidence behind each
- Running a scratch program — this library's first lesson, and the one to read before any of the above if
rustcitself is new - Resources — the full shelf, for after
Po polsku¶
Plan z tej strony — The Book rozdziały 1–10, rustlings równolegle, Rust by Example w drugiej zakładce — po polsku działa mniej więcej do połowy, i warto z góry wiedzieć, gdzie się urywa. Język Programowania Rust, społecznościowe tłumaczenie The Book, jest przetłumaczone po rozdział 9 włącznie; rozdział 10 — typy generyczne, cechy (traits) i czasy życia — stoi tam nadal po angielsku. Kurs Google'a ma polską wersję pod adresem z /pl/, ale nie ma jej w wyborze języków i przetłumaczona jest wyrywkowo, czasem zdanie po zdaniu. Tour of Rust ma po polsku rozdziały 1–5. Wychodzi z tego jedna prawidłowość: polskie materiały kończą się dokładnie tam, gdzie polskie słownictwo i tak jest najcieńsze — przy cechach, czasach życia i typach generycznych.
Główna teza tej strony — że te trzy źródła zawodzą na trzy różne sposoby, więc trzeba ich trzech — ma dla czytającego w drugim języku jeszcze jedno dno. Czytanie jest najtańsze: książkę da się przejść ze słownikiem i mieć poczucie postępu. Pisanie jest najdroższe, bo dopiero wtedy odzywa się kompilator, a angielszczyzna rustc to osobny dialekt — kilkadziesiąt powtarzalnych formuł w rodzaju borrow of moved value, expected …, found …, cannot borrow as mutable more than once. Żadna książka ich nie nauczy, bo w książkach nie występują. Dlatego z tego planu najłatwiej wypada punkt drugi, czyli rustlings — a to właśnie on uczy czytania komunikatów. Rust by Example jest z kolei źródłem o najniższym progu językowym, bo ciężar niesie tam uruchamialny program, a nie proza.
Punkt czwarty — przeczytać The Book drugi raz — po polsku jest ważniejszy niż po angielsku i łatwiej go pominąć: pierwsze przejście w obcym języku kosztuje dwa razy więcej, więc kusi, żeby uznać sprawę za zamkniętą. Warto zrobić odwrotnie i rozdzielić te dwa czytania między języki: pierwsze po polsku (dokąd tłumaczenie sięga), drugie po angielsku w wydaniu Browna, którego quizy sprawdzają model, a nie rozumienie tekstu. A jeśli prowadzisz własny słowniczek, trzymaj angielskie hasło jako główne, a polskie jako objaśnienie. Słownik ułożony odwrotnie jest bezużyteczny w jedynym momencie, w którym byłby potrzebny — kiedy kompilator coś wypisze.
Szukaj po polsku: nauka Rusta od podstaw · Język Programowania Rust · Tour of Rust po polsku · rustlings · rust book brown university edition