Rustlings Review: Learn Rust by Fixing Broken Code
Rustlings turns learning Rust into a series of small, broken programs you have to fix before they'll even compile. That's a sharper way to learn a notoriously strict compiler than reading prose alone, and pairing it with the official Rust book โ exactly what the project's own README recommends โ beats using either resource by itself.
What is Rustlings?
Rustlings is a collection of small Rust exercises maintained by the rust-lang organization, each one a short file that fails to compile or panics until you fix it. It's built to run alongside the official Rust book rather than replace it, and the project's website hosts a demo plus setup instructions.
What Exercises Does Rustlings Cover?
- โEvery exercise is a small Rust file that won't compile or panics until you track down and fix the bug โ the 'broken code' format the whole project is built around.
- โExercises run through cargo, so fixing them means reading real compiler and cargo output instead of picking answers off a quiz.
- โThe README explicitly recommends working through Rustlings in parallel with the official Rust book, not instead of it.
- โBeyond the repo, Rustlings has its own website (rustlings.rust-lang.org) with a demo and setup walkthrough.
- โGitHub tags it beginner-friendly โ aimed at people new to Rust, not experienced systems programmers looking for a refresher.
- โIt lives directly under the rust-lang GitHub organization, the same org that maintains the Rust language, under the MIT license.
Strengths
- โEach exercise isolates one problem, so a wrong turn costs a few minutes, not an afternoon lost in a half-built project.
- โMaintained by rust-lang itself, not a third party.
- โMIT licensed, so forking or adapting the exercises for a workshop or classroom is unrestricted.
- โDesigned to complement the official Rust book instead of competing with it.
Where Rustlings Falls Short
- โณThe GitHub repo's README is sparse โ almost everything about setup and exercise structure lives on the external website, not in the repo you'd clone.
- โณThere's no install or usage walkthrough in the repository itself, so you're sent off-site before you've written a line of code.
- โณIt only trains syntax and compiler-level correctness โ finishing every exercise doesn't teach you how to structure a real multi-file crate.
- โณFixes happen one isolated file at a time, so you don't get practice on the cross-module problems an actual project throws at you.
Rustlings Alternatives
Frequently Asked Questions
Rustlings is released under the MIT license and hosted as a public, free GitHub repository maintained by the rust-lang organization, so there's no cost at all to download, run, fork, or modify any of its exercises.
The Rustlings README doesn't state a fixed completion time. Pace depends on how much Rust you already know and how many exercises you work through per sitting, so treat it as self-paced rather than a timed course.
The Rustlings GitHub README doesn't spell out platform-specific setup steps. The project runs through Cargo, and full setup details for your operating system live on the project's website rather than the repository.
Rustlings is tagged beginner-friendly on GitHub and doesn't assume prior Rust knowledge. Some general programming familiarity, like knowing what a variable or function is, makes the earliest exercises move faster.
The Rustlings GitHub README doesn't describe the checking workflow in detail. It points to the project website for the full setup and demo, which is where that process gets explained.
The repository's README doesn't cover what happens after the last exercise. For that detail, the README directs learners to the Rustlings website, which hosts the full demo and setup information.
Best use cases
- โขWorking through Rust fundamentals chapter by chapter alongside the official Rust book.
- โขGiving a developer who knows another language hands-on reps with Rust's compiler before they touch production code.
- โขA short daily habit โ a handful of exercises at a time โ for someone learning Rust outside of work hours.
Who should try it โ and who should skip
Try Rustlings if you're new to Rust and learn better by fixing broken code than by reading about it โ going chapter by chapter alongside the official Rust book is the path the project's own README points to. Skip it if you already write Rust day to day, or if you need setup and usage instructions inside the repo itself rather than on an external website.
Related repositories
Is rustlings worth your time?
ChatGPT, Claude and Perplexity can all read this page. Ask one of them what it makes of rustlings.
