Rust by Practice: The Missing Middle Ground Between Tutorials and Real Projects
If you've spent any time learning Rust, you know the pattern. You work through the book, follow the examples, and feel pretty good about Option, Result, borrowing, and lifetimes. Then you open a real project and realize you're not ready. The gap between "I've read the concepts" and "I can actually solve problems" is real.
Rust by Practice is a direct shot at bridging that gap. It's a collection of exercises that push you past the basics without throwing you into a full production codebase.
What It Does
Rust by Practice is an open source exercise book. It's structured like a course, but every chapter is packed with hands on problems. You don't just read about pattern matching, generics, or async. You write code that breaks, fix it, and learn from the experience.
The exercises range from filling in blanks to writing small programs. They cover topics like:
- Basic syntax and ownership
- Pattern matching and enums
- Structs, traits, and generics
- Error handling and collections
- Lifetimes, closures, and smart pointers
- Async programming, macros, and more
Everything is organized into clear chapters with increasing difficulty. You start with "easy" and slowly work your way toward "hard" without abrupt jumps.
Why It's Cool
-
It's not a tutorial. There's no hand holding. You get a problem, sometimes with type hints or skeletons, and you need to make it work. That's how you actually learn.
-
Real world relevance. The exercises mimic patterns you see in real Rust projects. You'll practice ownership transfers between functions, implement traits, handle errors properly, and work with lifetimes. It's not academic.
-
Built in online editor. You don't need to clone the repo or set up a Rust environment to try it. There's a web version where you can write code directly. That lowers the friction to almost zero.
-
It's free and community driven. The project is MIT licensed, and contributions are welcome. People add new exercises and fix issues regularly. It's not a stale project.
How to Try It
You have two options.
Option 1: Use the web version
Go to practice.rs and start immediately. No setup, no installs.
Option 2: Clone the repo
If you prefer local development:
git clone https://github.com/sunface/rust-by-practice
cd rust-by-practice
Then open the exercises in your editor. Each chapter has its own folder with Markdown files containing the problem statements and code stubs.
To check your answers, the repo includes a solution branch and hints for most exercises. I recommend trying without solutions first, then peeking when you're stuck. That's where the learning happens.
Final Thoughts
Rust by Practice is the kind of resource I wish I had when I started. It doesn't try to replace "The Book" or Rustlings. It sits in between. If you've finished the basics but feel shaky when writing real code, go through a few chapters. You'll come out more confident and comfortable with Rust's quirks.
The exercises aren't always easy, but they're fair. And you'll actually remember what you practice.
Originally spotted on @githubprojects
Repository: https://github.com/sunface/rust-by-practice