Skip to content

Exercises

Level: reference

One line: Four practice tracks, and they are for four different stages — the common mistake is starting the hardest one first and concluding that Rust is not for you.

All links checked 2026-08-23.

Track Stage Shape
rustlings ↗ first week ~100 tiny broken files; fix the compile error
100 Exercises to Learn Rust ↗ first month a course that builds one program, test-driven
Rust By Practice ↗ any, as a drill topic-by-topic problems with solutions
this library's katas alongside a lesson one exercise per idea, in reading order

rustlings

Covered in full in Start here — why it is foundational, the current install (the widely-copied curl … install.sh line is dead), the 6.5 subcommands, and the exercise-to-Book-chapter mapping for all 24 sets.

The short version: do it first, do it alongside The Book, and stop when it starts feeling like filling in blanks.

100 Exercises to Learn Rust — the best of them

Mainmatter's course ↗ is a book and a test suite in one repository: a hundred exercises that accumulate into one real program, each with a chapter of prose and a failing test. There is a PDF ↗ and a solutions branch ↗. The prose half is also readable online at rust-exercises.com/100-exercises ↗ without cloning anything, which is the form to link when you want one chapter — String slices ↗ is the one this library sends people to most.

This is the one to do properly if you are going to do one properly. It is test-driven throughout, which means it also teaches the habit this library's strict lints page depends on — that unwrap in a test is fine and everywhere else is a decision.

Rust By Practice — the drill book

practice.course.rs ↗ is organised by topic rather than as a sequence, which makes it the one to use when you know what you do not understand. Solutions included, so it is self-checking.

Workshops with a syllabus

Building something instead

At some point the answer stops being an exercise track.

Command-Line Rust ↗ (Ken Youens-Clark) rebuilds the classic Unix tools — head, cat, wc, grep — one per chapter, each with a full test suite. It is the natural next step after an exercise track because the programs are real, small, and have an obvious definition of correct.

The elevator kata is the other kind of project — one problem, three incompatible published versions of it, and a design decision to make before any code. Worked through on its own page.

And the long way round to a column summary is this library's own version of that: a sequence of lessons where each is the next thing Rust wants to teach, and the running example happens to be a small file-summarising tool.

See also

Po polsku

Cztery ścieżki z tej strony to nie cztery alternatywy do wyboru, tylko cztery kolejne etapy, i cała rzecz polega na tym, żeby nie wybierać ich według trudności. Typowa pomyłka wygląda tak: „po co mam poprawiać literówki w stu malutkich plikach, wezmę od razu makra proceduralne” — po czym proc-macro-workshop skutecznie przekonuje człowieka, że Rust jest nie dla niego. To jest wniosek o kolejności, a nie o zdolnościach. Porządek jest prosty: najpierw rustlings (pierwszy tydzień), potem 100 Exercises jako jedyny kurs, który warto zrobić porządnie od początku do końca, Rust By Practice wyrywkowo — wtedy, gdy już wiesz, czego nie rozumiesz — a na końcu własny program, bo tylko on wymaga podejmowania decyzji, a nie wypełniania luk.

Żadna z tych ścieżek nie ma polskiej wersji i to mniejszy problem, niż się wydaje, bo rustlings to w gruncie rzeczy rozmowa z kompilatorem: czytasz komunikat rustc, poprawiasz jedną linijkę, uruchamiasz ponownie. Angielskiego jest tam zaskakująco mało i wciąż tego samego — expected, mismatched types, borrow of moved value, cannot borrow as mutable — więc po stu ćwiczeniach zna się ten słownik na pamięć, co jest osobną korzyścią, nie kosztem. Praktyczna rada: kod błędu (E0308) traktuj jak klucz wyszukiwania, bo jest niezależny od języka i prowadzi do tej samej odpowiedzi niezależnie od tego, w czym pytasz; rustlings hint jest od podpowiedzi, a rustc --explain E0308 od dłuższego wyjaśnienia po angielsku.

Jako lekturę towarzyszącą pierwszemu tygodniowi dobrze działa Tour of Rust po polsku (rozdziały 1–5 są przetłumaczone), a od rozdziału 6 i tak przechodzi się na The Book. Nie warto czekać z ćwiczeniami na polski kurs — on nie powstanie w tym tempie, w jakim zmienia się język.

Szukaj po polsku: ćwiczenia z Rusta · kurs Rusta po polsku · rustlings · 100 exercises to learn rust · rustc --explain