https://www.oreilly.com/library/view/programming-rust-2nd/97...
https://www.ebooks.com/en-us/book/210313783/programming-rust...
Bad news is that the O'Reilly site's page for the book is now (as of around start of 2023) sending people to a subscription, though:
https://www.oreilly.com/library/view/programming-rust-2nd/97...
They used to send people to Amazon or Ebooks.com first:
https://web.archive.org/web/20221128145404/https://www.oreil...
Longer term, I don't know whether they intend to keep Ebooks.com and Amazon as options at all, for those who can find the options.
The book does a really good job at explaining the thinking behind the abstractions available in the standard library. To me, this was the book that made everything click, so that I did not feel I was fighting against the language.
[0]: https://www.oreilly.com/library/view/programming-rust-2nd/97...
https://www.oreilly.com/library/view/programming-rust-2nd/97...
Its a very comprehensive book but takes some dedicated effort to get through. It goes through most (all?) important concepts from barrowing to iterator traits to some async. Give yourself a fair amount of time to read this and find small projects to do along the way to reinforce your knowledge.
First: https://www.oreilly.com/library/view/programming-rust-2nd/97...
If you want to go deeper after that: https://nostarch.com/rust-rustaceans
That means what the best way to start is depends on your background. In my eyes you can do nothing wrong with going through the rust book you already mentioned. Having read 4 different Rust books I have to say this introduction in combination with "Programming Rust" by Jim Blandy, Jason Orendorff, Leonora F. S. Tindall is probably the best way to get started. https://www.oreilly.com/library/view/programming-rust-2nd/97...
I'm still very much a Rust beginner, but I've managed to build a couple of useful tiny projects and to hack a feature I wanted into someone else's big 'ol codebase!
¹https://www.oreilly.com/library/view/programming-rust-2nd/97...
"Programming Rust, 2-nd edition" by Jim Blandy, Jason Orendorff, Leonora F. S. Tindall [1]
[1] https://www.oreilly.com/library/view/programming-rust-2nd/97...
[1]: https://www.oreilly.com/library/view/programming-rust-2nd/97...
https://www.oreilly.com/library/view/programming-rust-2nd/97...
The book gives good visual explanations for how each of the code examples and it spends a good amount of time showing the relationship between the code examples and the borrow checker, OS, etc.
As most language books it spends a lot of time going through all the types, which I've always found incredibly boring - the same thing is the case with this book.
I'd recommend reading about strings and slices before moving on to the examples, but spread out the rest of those chapters in between the more interesting ones
The recording and more findings is at https://everyonecancontribute.com/post/2020-10-07-cafe-3-git... The session took longer, because we failed to understand the principle of modules at first. We solved it after a while.
A more advanced attempt included Rocket.rs and Prometheus metrics instrumentation: https://everyonecancontribute.com/post/2021-06-30-cafe-36-ru...
For learning Rust (and later teaching), I got 2 books:
- Programming Rust: Fast, Safe Systems https://www.oreilly.com/library/view/programming-rust-2nd/97...
- Hands-on Rust: Effective Learning through 2D Game Development and Play https://pragprog.com/titles/hwrust/hands-on-rust/
I love gamification when learning things, and game development is something I always wanted to learn.
For a learning dev environment, I recommend Gitpod in your browser. Cargo and rustc come pre-installed in the default workspace image. A short example is in this blog post: https://about.gitlab.com/blog/2021/07/19/teams-gitpod-integr... (search for "Learn new programming languages: Rust")
More learning resources are at https://www.rust-lang.org/learn
The O’Reilly book by Jim Blandy and Jason Orendorff. It is a really fantastic book on a programming language, the best I’ve ever read. The new edition is due this year it seems.
https://www.oreilly.com/library/view/programming-rust-2nd/97...
2. Write 1 or more serious rust projects of your own choosing. Aim for projects that’ll be thousands of lines of code.
3. Read “Programming Rust”[1]
4. Write more projects
This is what I did anyway.
The Rust discord has a beginners channel which is invaluable for asking questions when you get stuck.
0: https://doc.rust-lang.org/book/
1: https://www.oreilly.com/library/view/programming-rust-2nd/97...
I tried reading "The Rust Programming Language" book, but had difficulty with it.
The book that worked for me was "Programming Rust": https://www.oreilly.com/library/view/programming-rust-2nd/97...
The way that it explained things made more sense to me and helped me to understand many of the design decisions behind why Rust works the way that it does.
But reading books only takes you so far. You need to write code and read code to understand through experience. I took a C program that I wrote at my job and rewrote it in Rust. It was a revelation: in writing the Rust version I discovered many bugs that were not obvious in the C version simply because of Rust's detailed approach to error handling. The Rust version was much easier to understand and maintain and is the one we use now.
I was originally very skeptical of Rust, but if you write software in C or C++ and then write comparable software in Rust, it makes you want to use Rust every time instead. Rust code helps prevent errors of all types that C and C++ allow. Rust tooling and the ecosystem of crates are so much easier to use.
Here is a quote from "Programming Rust" that I found motivating: