
Master professional-level coding in Rust. For developers who’ve mastered the basics, this book is the next step on your way to professional-level programming in Rust. It covers everything you need to build and maintain larger code bases, write powerful and flexible applications and libraries, and confidently expand the scope and complexity of your projects. Author Jon Gjengset takes you deep into the Rust programming language, dissecting core topics like ownership, traits, concurrency, and unsafe code. You’ll explore key concepts like type layout and trait coherence, delve into the inner workings of concurrent programming and asynchrony with async/await, and take a tour of the world of no_std programming. Gjengset also provides expert guidance on API design, testing strategies, and error handling, and will help develop your understanding of foreign function interfaces, object safety, procedural macros, and much more.
1. The Rust Book (Free) - https://doc.rust-lang.org/book/
2. Rust by Example (Free) - https://doc.rust-lang.org/rust-by-example/
3. Rust Atomics and Locks - https://marabos.nl/atomics/
4. Rust in Action - https://www.rustinaction.com/
5. Rust for Rustaceans - https://rust-for-rustaceans.com/
Also Jon Gjengset's channel is immensely valuable: https://www.youtube.com/c/JonGjengset
For example instead of taking a high level language view of a var containing a piece of data, you'll begin to visualize a variable points to a place in memory with data associated to it, and can work from there whether you want to move, borrow, or drop it. Lifetimes lets the compiler know how long should that point in memory last within the program before being dropped. But most of the time you don't have to worry about it thanks to lifetime elision.
"The Book" is the best place to start, then there's Rust by Example that shows code snippets. The Reference goes into the why. Rust for Rustaceans helped me understand how to put projects together, but if you like reading source code of different crates you'll see a pattern that they follow. Blessed.rs is a website for the most popular go-to crates in the ecosystem. Reading the std lib is also good to see what already exists instead of reinventing the wheel.
I came from an Elixir background so things like immutability and pattern matching already made sense. What great about rust IMO is the type system, programming with structs and traits, and knowing that if it compiles it should for the most part work if there's no logic bugs.
Don't forget to practice and work on real projects, the concepts take a little bit to get used to, and just reading about it is not enough.
