Learning Rust in 2024 - essential resource
Posted Jan 01, 2024 ‐ 4 min read
You may asking yourself: "Why should I learn Rust in 2024?".
There are many reasons why you would like to learn Rust.
Here are my favorites:
- community - inclusive and welcoming
- performance - you can write highly-concurrent code
- safety - the compiler makes sure that your code is safer than code written for other low or high-level languages
- tooling - Rust has the best tooling around the language on the market
- it helps me to combat boredom and burnout caused by, amoung others, using languages that I don't like
Of course there are many other valid reasons to learn Rust. You already may have your own.
For me, learning Rust was also a career-changing moment. My previous primary language is not that versatile. Also it is losing popularity. It was like abandoning a sinking ship.
Isn't it a bit early or too late?
Today, Rust is simple language. I say simple, but it's not super simple. It may not be the best language to learn as a first language. But this language is powerful. It will empower you to create whatever you want, whatever is possible. When you master this language, you will be only limitted by your imagination, available time and hardware.
So isn't it a bit early for you? In my humble opinion, if you have one year of experience in any other programming language, you can try to learn Rust.
So isn't it too late for you? Learning is not like catching train. It is never too late to start. My first attempt to learn Rust was twenty years after I started my programming journey. For some reasons I didn't finished reading the book. Five years later, I started again reading the book. And I learned how to program in Rust.
What book?
The book I'm talking about is "The Rust Programming Language" by Steve Klabnik and Carol Nichols, with contributions from the Rust Community.
Don't get me wrong here. There are many good resources for learning Rust. I'll try to present some of them in the following articles. But I call this book essential, because it's the only thing that you really need at the beginning of your journey.
List of chapters
- 1. Getting Started
- 2. Programming a Guessing Game
- 3. Common Programming Concepts
- 4. Understanding Ownership
- 5. Using Structs to Structure Related Data
- 6. Enums and Pattern Matching
- 7. Managing Growing Projects with Packages, Crates, and Modules
- 8. Common Collections
- 9. Error Handling
- 10. Generic Types, Traits, and Lifetimes
- 11. Writing Automated Tests
- 12. An I/O Project: Building a Command Line Program
- 13. Functional Language Features: Iterators and Closures
- 14. More about Cargo and Crates.io
- 15. Smart Pointers
- 16. Fearless Concurrency
- 17. Object Oriented Programming Features of Rust
- 18. Patterns and Matching
- 19. Advanced Features
- 20. Final Project: Building a Multithreaded Web Server
- Appendix
This book has a good coverage of the basics and more advanced topics. After reading it, you should have a good grasp on the language. Don't worry if you don't understand everything. Some topics are pretty advanced. It's possible that language(s) you used before didn't had these features. Also, don't hasitate to reread this book. I've reread it three times in one year (I like reading books for beginners).
Please consider buying the second edition of the book "The Rust Programming Language, 2nd Edition".
I hope I encourage you (and I didn't bore you) to learn Rust in 2024 :).