ŷ

Jump to ratings and reviews
Rate this book

Rust for Rustaceans

Rate this book
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.

You'll Learn:

How to design reliable, idiomatic, and ergonomic Rust programs based on best principles
Effective use of declarative and procedural macros, and the difference between them
How asynchrony works in Rust � all the way from the Pin and Waker types used in manual implementations of Futures, to how async/await saves you from thinking about most of those words
What it means for code to be unsafe, and best practices for writing and interacting with unsafe functions and traits
How to organize and configure more complex Rust projects so that they integrate nicely with the rest of the ecosystem
How to write Rust code that can interoperate with non-Rust libraries and systems, or run in constrained and embedded environments

Brimming with practical, pragmatic insights that you can immediately apply, Rust for Rustaceans helps you do more with Rust, while also teaching you its underlying mechanisms.

251 pages, Paperback

First published January 1, 2021

217 people are currently reading
679 people want to read

About the author

Jon Gjengset

1book88followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
178 (62%)
4 stars
81 (28%)
3 stars
18 (6%)
2 stars
5 (1%)
1 star
1 (<1%)
Displaying 1 - 29 of 29 reviews
Profile Image for Jon Gjengset.
Author1 book88 followers
July 1, 2021
I think it's pretty decent, but I also wrote it so take it with a pinch of salt 😅
Profile Image for Sebastian Gebski.
1,150 reviews1,256 followers
October 24, 2021
It's probably the only book on Rust for non-beginners (which kinda puts some pressure, doesn't it? ;>). Fortunately - it's good, even very good.

I'd appreciate more code samples (especially in the initial 40%), nevertheless, it's hard to question that the book contains a lot of valuable knowledge - regarding memory management, macros, async programming, concurrency, etc.

Keep in mind that it's not easy to follow - it requires not only Rust expertise, but also a lot of focus and patience. The author doesn't use any graphics (diagrams, visualizations, etc.), so there's a lot of text to get through.

Few important parting comments:
* the book is not intended for any specific scenario (e.g. embedded) - it's a generic Rust book
* don't even reach out for it, if you're not proficient with Rust (or your Rust is rusty)
Profile Image for Bugzmanov.
230 reviews89 followers
June 26, 2022
I can't say that this book blew my mind, but it has a unique position - it targets people who already know rust and want to level up. And it delivers. If you don't know rust it will be pretty much inaccessible, but if you do - it's a joy to read.
It is short and it's a rare case when I wished that a book had more content. Jon is an excellent educator and his streams on youtube are amazingly good, so it was a bit disappointing to see that the book has less than 300 pages.
And god I wish it had more code examples & diagrams. Some explanations are just wall of text and you had to use your imagination quite a bit to get the idea. Meanwhile I can imagine that a short code snippet would be more than enough to explain the same concept. And drawings.. there are not enough of them too.
Profile Image for David.
134 reviews21 followers
May 24, 2023
Jon Gjenset's book is deceptively dense and difficult, but deeply useful. You may be tempted to start your Rust learning with this 250 page book - rather than one of the other typically 500+ page resources - but you'll only end up putting the book down and have to pick it up again in the future (I started reading it last July, but wasn't ready for it yet).

It dives deep into low-level implementation details to help teach the "why" of certain Rust API design choices. And it is often written with the assumption you've already encountered certain ideas through prior experiences. You'll appreciate the frequent tips and mention of third-party crates after you've worked a few projects, but otherwise the pace of the book wouldn't be ideal for learning the language.

There are chapters devoted to asynchronous programming and working with atomic types which you won't find currently in other books. It dissects Futures, pinning and even generators, and helps illuminate the inner workings of async Rust. And although many books do dive into concurrency themselves, none really cover Ordering - as it relates to CPU registers and the load/store API of Atomic types - much less help prepare you for this class of bug troubleshooting.

An excellent resource to deepen an understanding of programming Rust, the Rust standard library, and the Rust crates ecosystem.
Profile Image for João Paiva.
44 reviews6 followers
February 13, 2023
Maybe the only intermediate programming book I've ever read. I liked the experience, and I wish I had read similar books for the other languages I know. It's a great complement to the rust book. My only criticism is at times it assumes one knows the rust book by heart 😅.
I particularly appreciated the last sections on common patterns and useful functions. Ending the book with more learning resources and suggestions of next steps is also pretty amazing; I got myself a bunch of links to follow-up on.
58 reviews2 followers
May 5, 2024
I absolutely love this format. Concise and to the point; makes for a quick and easy read. There are many of nuggets of rust expertise sprinkled throughout, and that’s where much of the value of this book comes from in my opinion. Note that these are real-world Rust patterns or practical considerations (eg, design patterns, considerations to make when exposing public parts of an interface, aspects and invariants of safety you need to consider when wrapping an unsafe API) rather than nitty gritty details about compiler internals or super specific details about how to write macros, etc. The strength of this book is the practical guidance. In that sense, I see this as basically the best equivalent of Effective Java or Effective Modern C++, but for Rust. On the other hand, these nuggets are not specifically called out or organized in a way amenable for quick reference, so I found myself taking my own notes along the way. YMMV, depending on what you’re looking for. On the other hand, the book is concise enough that I think most people should read it end-to-end anyway.

The book does go into some depth on selected topics, such as async internals and atomics, but not enough for the reader to gain any level of expertise. For that level of understanding, you’ll need to look elsewhere and likely hack on the internals yourself (or at least read the code).
Profile Image for Steven Cole.
293 reviews11 followers
December 28, 2021
Thoroughly engaging and well worth the read.

This is one of the few programming books I've ever read whose purpose is to level up the programmer who already has the basics down. This is the place I find lacking in nearly all other books, which always seem to assume a novice.

Loved it, loved it, loved it.
Profile Image for Robert.
4 reviews
June 21, 2022
Deep dive and discussion into various advanced Rust topics. The author is very knowledgeable about the details of the language which is reflected in the book. In my opinion this is currently one of the best resources to learn more of the ins-and-outs of Rust.

Code snippets are used at various points but I would have wished for more diagrams and visualizations.
1 review
June 22, 2022
A fantastic read for a Rust programmer looking to take the next steps. Jon obviously took great care to ensure this book was written not to be reliant on the exact current state of the language and its surrounding ecosystem. The book focuses on tougher, but still fundamental aspects of being a Rust developer.
4 reviews
January 3, 2024
I read The Book, then Programming Rust, then this book. This felt similar to Programming Rust in its pacing, depth, and topics. I typically evaluate the quality of programming books by how reliably they anticipate my confusion (e.g “you’re probably wondering…�), and Gjengset did a good job, but not quite as good as Programming Rust.
Profile Image for Quique .
72 reviews
June 29, 2024
Loved reading this. Definitely not a begineers book, but full of nice idiomatic nods to more experienced Rust devs. Enjoyed most of it and could appreciate I was not the right audience for the rest (for example, unsafe sections: probably wouldn’t fly at Big companies adopting Rust). Really recommend reading after reading “the book�.
Author2 books4 followers
January 4, 2022
The author does an excellent job explaining intermediate Rust concepts. I have been professionally programming Rust for a couple of years now, but I was able to learn a lot from this book and it's changed how I approach certain problems.
1 review
June 21, 2022
Amazing resource to dive into the nitty-gritty details of how things work under the hood. The author has a great style of explaining these details without unnecessarily overcomplicating matters. I can see this becoming a classic for the ages.
4 reviews1 follower
Read
August 9, 2023
It was a pleasure to read it as it's a good repeat of all rust core concepts. It's still hard to understand because of Rust's way of doing things, would not recommend reading it if you don't have at least 1-1.5 years of Rust experience
Profile Image for Richard.
Author3 books12 followers
February 27, 2022
Fun to go deeper into Rust. The last chapter is a collection of “useful stuff�, distilling handy crates and tricks, which I appreciated.
1 review
June 21, 2022
Best book for intermediary concepts, I have not finish it yet but so far is excellent specially the async part.
1 review
June 22, 2022
Great book to understand advanced concepts, I’m not an english native speaker and followed along easily. Technical terminology is introduced cleverly, thanks ! 👍
2 reviews
April 15, 2024
This is the book that made me feel like an 'experienced' Rust developer.

If you like making good libraries and understanding the reason behind common patterns, this book will help a lot. 10/10 😄
Profile Image for Denis Nuțiu.
60 reviews5 followers
January 29, 2025
I liked this book but I'd wish that the author included more concise code examples, when explaining some concepts. Other than that the book is great for leveling up your Rust knowledge.
Profile Image for Toại Dương.
4 reviews
July 28, 2023
Appreciate the deep dive in async mechanic behind the future crate, but would be fantastic if it could give more pseudo code where the interaction between runtime/reactor/waker happens
15 reviews6 followers
May 25, 2023
Incredibly information dense, gives guidance beyond the basics
Not enough worked examples (the book should be 2x in length to accomodate that)
Will take you to intermediate level
The kind of book you have to read at least twice.
34 reviews5 followers
September 8, 2024
Great continuation for those that already write some rust. The book is quite short and sometimes I would have wanted more examples and to have the topics made more formal and less hand-wavy, but it's been a great intro to some topics I didn't know before. I found that, maybe for the first time ever, I was missing excersices at the end of each chapter, to check my understanding. I found that quite often I read the book and the std library documentation at the same time, for example about async, when I didn't think the topics were presented in the best possible way. But it gave some insight and then it was much easier to read the documentation. The book often referred to another book, "The Rust programming language" which I haven't read, so I sometimes got there feeling that I'm missing something.
Some code examples are the same as in The Rustonomicon, and that book sometimes gives better explanation what's going on, so that's another must-read resource (that Jon frequently refers to in his book).

All in all, despite its downsides, this book is still 5/5 stars with a margin.
9 reviews
March 2, 2023
The author is a truly skilled professional in programming and a truly passionate teacher. I found a lot of value in reading this book especially in expanding my breadth of knowledge (not so much learning about specific details) but to learn what is out there in order to know what to study in more detail to level up your skills. That said i still think there is significantly more value in his livestreams and other content on his youtube channel, but this is great for someone who likes to read (and learn) on paper.

Note: The book is sometimes listed for 40$ on amazon, but it often drops to as low as 8$ -i wouldn't pay 40$ for it.
Displaying 1 - 29 of 29 reviews

Can't find what you're looking for?

Get help and learn more about the design.