Rust by Practice
About 2 min
Rust by Practice ๊ด๋ จ
Practice Rust with challenging examples, exercises and projects
This book was designed for easily diving into and get skilled with Rust, and it's very easy to use: All you need to do is to make each exercise compile without ERRORS and Panics !
Running locally
We use mdbook building our exercises. You can run locally with below steps:
cargo install mdbook
cd rust-by-practice && mdbook serve
Features
Part of our examples and exercises are borrowed from Rust By Example, thanks for your great works!
Although they are so awesome, we have our own secret weapons
- There are three parts in each chapter: examples, exercises and practices
- Besides examples, we have a lot of exercises, you can Read, Edit and Run them ONLINE
- Covering nearly all aspects of Rust, such as async/await, threads, sync primitives, optimizing, standard libraries, tool chain, data structures and algorithms etc.
- Every exercise has its own solutions
- The overall difficulties are a bit higher and from easy to super hard: easy ๐ medium ๐๐ hard ๐๐๐ super hard ๐๐๐๐
What we want to do is fill in the gap between learning and getting started with real projects.
Table of Contents
- 1. Small projects with Elegant code
- 2. Variables
- Basic Types
- Ownership and Borrowing
- 5. Compound Types
- 6. Flow Control
- 7. Pattern Match
- 8. Method & Associated function
- 9. Generics and Traits
- 10. Collection Types
- 11. Type Conversion
- 12. Result and panic
- 13. Crate and Module
- 14. Comments and Docs
- 15. Formatted output
- 16. Lifetime
- 17. Functional programing
- 18. newtype and DST
- 19. Smart pointers TODO
- 20. Weak and Circle reference TODO
- 21. Self referential TODO
- 22. Threads TODO
- 23. Global variables TODO
- 24. Errors TODO
- 25. Unsafe doing
- 26. Macro TODO
- 27. Tests TODO
- 28. Async/Await TODO
- 29. Standard Library TODO
- 30. Fighting with Compiler