Effective Rust: 35 Specific Ways to Improve Your Rust Code
Best for: Developers who've learned Rust's syntax and basic rules but keep writing code that compiles yet feels 'not quite Rust,' and want concrete, itemized fixes.
- ISBN-13: 9781098151409
- Level: intermediate
- Published: 2024
Written in the Effective Java/Effective C++ tradition, this book is 35 independent, numbered items rather than a linear tutorial, so it works equally well read cover to cover or dipped into for whatever’s currently biting you. David Drysdale, a staff engineer at Google who has shipped Rust in security-sensitive production code (including replacing part of Android’s cryptography stack), writes from the perspective of someone who’s had to review a lot of other people’s “technically correct” Rust and knows exactly where it tends to go wrong.
The items on the type system are the strongest section — using the type
system to make illegal states unrepresentable, understanding when From
and TryFrom should replace ad hoc conversion functions, and a genuinely
clear explanation of when to use generics versus trait objects, a decision
a lot of intermediate Rust developers get wrong in both directions. The
chapters on error handling (structuring error types, when to use anyhow
versus a custom enum) and on dependency and tooling hygiene are similarly
grounded in real production tradeoffs rather than textbook advice, and the
whole book is also freely readable at the author’s site.
Where it’s weaker: at 35 items it’s noticeably shorter than the 600-plus-page systems books on this list, so it reads more like a well-curated checklist than a deep reference — some items are only a few pages and won’t satisfy a reader who wants the full “why” behind a rule the way Rust Atomics and Locks does for concurrency.
Compared to Rust for Rustaceans: Gjengset’s book goes deeper on harder topics (unsafe, API design, lifetimes) for advanced readers; this one is broader and more approachable, closer to a “here’s the idiomatic way” checklist for someone newer to writing production Rust.