For a beginner: The Rust Programming Language or the Programming Rust book?

Hey,
I'm quite new to the rust programming language and want to learn it fully.
For that, I've found 2 interesting-looking books on Amazon:
The Rust Programming Language by Steve Klabnik
Programming Rust: Fast, Safe Systems Development 1st Edition by Jim Blandy
Did someone read one of them or even both? If yes, I'd be happy if you can write me your experiences with the book(s).

4 Likes

The former is also available online at Foreword - The Rust Programming Language, so it's an easy one with which to start.

I haven't read all of the latter, but the parts I have I quite liked. (And it was great sitting with the authors at last year's RustConf :sunglasses:)

What's your history with programming? Different backgrounds might have different preferences between the books.

4 Likes

Recommend buying both.

disclosure: I may be bias in liking the authors involved in both books.

2 Likes

I've been programming Java for 3-4 years. I know many concepts of programming especially object orientated programming. I also tried C++, but I gave up very soon because you can mess it up fast and have no plan why it won't work :sweat_smile:

I really prefer reading paper, so I had to start with Programming Rust since TRPL is not here yet. Programming Rust was excellent. I really felt it explained a lot of the concepts well and had me rolling within a few days, at least to a level where I could understand why things weren't working and could formulate questions to throw out here.

I have TRPL on order, but it isn't going to arrive for weeks, but essentially I am following booyaa and just buying both!

1 Like

I just finished reading Programming Rust, and I have nothing but positive things to say about it. So many things finally clicked for me while reading it. I've heard TRPL is really good too though, so I don't think there is really a wrong choice here!

4 Likes

In one sentence: The Rust Programming Language (TRPL) is for beginners who know programming and Programming Rust (PR) is for intermediate programmers.

Now for a more in depth answer. TRPL is what made Rust 'click' for me coming from an application developer's perspective. Try to focus all your energy on completely understanding the memory model. Create a text note called 'rules.txt' and write down all the memory rules found in the book (ownership rules, borrowing rules, etc). Try to create a personal project to experience the memory model while reading your 'rules.txt' when you encounter compiler issues. I cannot say this enough, becoming a productive Rust programmer is dependent on understanding the memory model.

For PR, I felt as if the book's purpose was to give an in depth explanation to most of the features found in Rust. If TRPL is the foundation, PR is the building. I reread this book from time to time because it has so much knowledge on a variety of Rust topics and it serves as a sort of status marker of my Rust knowledge. The book keeps me humble and inspires me to learn as much of Rust as possible. It would be a good investment to buy this book if you are driven by fiery curiosity and want to understand as many Rust features as possible.

In conclusion, no matter what learning material you choose please remember the following sentence: it pays to understand the memory model of Rust. All the pain you hear about in learning Rust is from people who ignore the previous sentence. I should know since I used to be one of them. Once you understand how the memory game is played, you can finally experience what all the hype is all about. Good luck!

9 Likes

Thank you all for your replies.
I'll buy both books.

Thanks for the tip! :slight_smile:

1 Like

I started with Programming Rust - It's really good book - it's also available for online read in Safari books. PR is more logically ordered from my view - gives better story. Then I also read TRPL. At least for myself it was beneficial to read about some core concepts ( aka borrows and lifetimes :slight_smile: from two different authors, two different perspectives.
Recently I also read the nomicon - although there are warnings in the beginning I did not found it so difficult and it also gave me good perspective on some core features.

Also this one is very good - talking about why 'simple' things like double linked list are not so simple in Rust.

3 Likes

I also found this book very useful - Rust Standard Library Cookbook by Daniel Durante, Jan Nils Ferner, Packt Publishing - I think it's a good book just after TRPL - there are many common approaches, idioms of RUST.

2 Likes

I can recommend Steve Klabnik book, however I don't know the second position, so can't compare them.

I am following both of them. You are a beginner, start with Steve Klabnik's book. It explains the concepts in a simple and easy way. However, you can come to Jim Blandy's book if you want to learn the concepts (say, lifetimes) in depth, and it also explains how other programming languages C, Python does the same thing - I found it very helpful.

I learned Rust via typing in all the examples from Introduction - Rust By Example , hitting compile, fixing typos, and making small modifications here & there.

1 Like

I've found some interesting reference here

1 Like