Work through graded exercises to learn Rust by filling in blanks or fixing broken code until it compiles
Practice Rust async, threads, and data structures without installing anything using the online editor at practice.rs
Host the book locally with mdBook to follow along offline at your own pace
Use the provided solutions to get unstuck and understand why your approach did not compile
Rust by Practice is a free, open learning resource for the Rust programming language. It is structured as a book of exercises: each chapter covers a specific part of the language, and your job is to make broken or incomplete code snippets compile and run correctly without errors. Each chapter has three sections: worked examples that show how something works, exercises where you fill in blanks or fix mistakes, and small practice projects that put multiple concepts together. Every exercise has a provided solution, so you can check your work or get unstuck. The exercises cover a wide range of topics, from basic types and ownership to more advanced areas like async programming, threads, synchronization, data structures, and standard library utilities. Difficulty is labeled explicitly, ranging from easy to "super hard." The exercises are available online at practice.rs, where you can read, edit, and run code directly in the browser without installing anything. If you prefer to work locally, the book is built with a tool called mdBook, which you can install and serve on your own machine. Both English and Chinese versions exist. The stated goal is to close the gap between reading about Rust and being able to write real code in it. The exercises are intentionally more challenging than typical introductory material, on the theory that working through harder problems builds confidence and skill faster. The book is licensed under Creative Commons Attribution 4.0, which means you can share and adapt it freely with credit.
← sunface on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.