Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.
GitHub repo · OtherFree

Rustlings

Small Rust exercises you fix in your own editor while a terminal tool checks each one. They follow the order of the Rust book, so reading a chapter and then doing its exercises is the fastest way to make ownership, enums and error handling stick.

Topics
GitHub stars

64.2k (rust-lang/rustlings)

GitHub · Sept 2026

Licence

MIT

GitHub · Sept 2026

Format

GitHub repo

Topic

Other

Provider

The Rust Project

Time needed

2 to 4 weeks alongside the Rust book

Level

Beginner

Access

Free

What Rustlings is

Rustlings is a set of small exercises that get you used to reading and writing Rust code. It is maintained under the rust-lang organisation on GitHub and installed with Cargo (cargo install rustlings). Each exercise is a short file that does not compile or fails a test. You fix it in your own editor, and the Rustlings tool running in your terminal checks your work and moves you on to the next one.

Is it worth doing?

Yes, especially in your first month. The Rust book explains the rules; Rustlings makes you apply them dozens of times in a few minutes each. The project itself recommends doing it in parallel with the book, and the exercises are grouped by the same topics: variables, functions, move semantics, structs, enums, strings, modules, collections, options, error handling, generics, traits, lifetimes, tests, iterators, smart pointers and threads.

How to use it well

Read a chapter of the book, then do the matching Rustlings group. When an exercise fails, read the compiler error in full before you change anything; learning to read those errors is half the point. Use the built-in hint only after you have tried. Resist changing code until it compiles without understanding why it now works.

How long it takes

Most people finish it in two to four weeks of short daily sessions alongside the book. Some groups, especially move semantics, lifetimes and traits, take longer than the rest.

Prerequisites

Rust installed with rustup, a code editor with rust-analyzer, and the Rust book open next to it. No prior Rust is needed.

Free or paid?

Completely free and open source under the MIT licence.

What you can do after it

Write and fix small Rust programs confidently, read borrow checker and type errors without panic, and move on to Tokio, Axum and a real service. Exercism's Rust track is a good next step for longer exercises with mentor feedback.

Common questions

Does it replace the book? No. It is practice, and the explanations live in the book.

Can I do it in the browser? It is designed to run locally with your own editor and toolchain, which is also the setup you will use for real projects.

beginner friendlyopen sourcebackend

Ready to start?

Opens on The Rust Project in a new tab.

Open resource
Link broken or out of date?

Report a problem

With "Rustlings". Only Tauseef reads this.

Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.