Software Design Enthusiast And Engineer

Rust In Action - Review

4 min read
Status: Completed Read year: 2024

I purchased this book a couple years ago now, I just never got around to diving into it until a couple weeks ago. Admittedly, I started reading it back then but I started 2nd-guessing the fact that I should learn Rust at the time. I decided I wanted to wait, which I'm glad I did. I stayed focused on PHP in the meantime, which is where the pay dirt is for my current job.

To give you an idea of what's covered in this book, here's the rundown:

Part 1 - Introducing Rust

  1. Rust language distinctives
  2. Language foundations
  3. Compound data types
  4. Lifetimes, ownership, and borrowing

Part 2 - Demystifying systems programming

  1. Data in depth
  2. Memory
  3. Files and storage
  4. Networking
  5. Time and timekeeping
  6. Process, threads, and containers
  7. Kernel
  8. Signals, interrupts, and exceptions

The Cons: let's get them out of the way


Outdated as of 2024

If there was an ideal time to read this book, it would've been when I 1st bought it back in 2022. Since it was released in June 2021 (it's now July, 2024), there are quite a few libraries used that have released major versions since then. Sure, this is to be expected in the industry, but this problem can often be avoided if the author maintains the code references/examples as time goes on - this isn't the case for this book, as you can see on it's Github page.

Depth of understanding any one topic isn't great

Part 1 of the book does a great job in covering the fundamentals of Rust, but we don't get to really exercise that knowledge as the rest of the book progresses. Instead, Part 2 dives into the systems-side of programming and how one can do some trivial tasks with Rust. Don't get me wrong, I loved learning about these aspects of Rust and seeing how these basic concepts are implemented, but I ultimately closed the book thinking, "that's all nice to know if I were to ever get that far with the language". I don't think I'm alone in wanting to create some command line applications as I dive deeper into Rust. It would've been great to know how to do more day-to-day tasks with Rust, e.g. database interactions, IPC, data manipulations/pipelines, etc. You know.. the stuff that makes a Rust programmer useful in the 1st place.

All code challenges/answers are given

It would've been great to have been given challenges to write vs just being given the code to do everything. I've come away having written out all lines of code mentioned, but I didn't come up with any of it. I wasn't challenged by the compiler (to a large extent) and I still feel like I'm uncertain about some of the more fundamental parts of the language.

Most code examples are for those who have a *nix system

Luckily, I'm working on a Mac, but if I only had access to a Windows machine, I feel like I would've been frustrated by not being able to participate with some of the lessons throughout this book. To be fair, I tend to see this issue with a lot of programming tutorials/lessons.

The "programming on embedded devices" in chapter 11 didn't work for me

This may have just been a versioning issue; a side-effect of how old the book is now, but I couldn't run the code when I was reading through this chapter. I did look through the comments that the online version of the book provides.

The Pros


Tim McNamara is top-notch

When originally dabbling in Rust, it was hard to find an online personality that had the instincts to explain the more complex (in Rust, this is generally systems programming) topics whenever they come up. Instead of just glossing over the technical jargon that we web developers have never heard of, Tim always seems aware of this fact. I've found that any great teachers I've come across always have this at the forefront of their mind. The content of this book is a testament to Tim's style; the complexity of the topics he's covering aren't easy! Despite the bad things I might say in this review, I still plan to follow Tim very closely and still enjoy his teaching style more than any other teacher I've found in the Rust community.

I learned a lot about systems programming basics

Having been a full stack web developer for the past 7-8 years, I don't have much experience when it comes to the lower-level systems programming topics. All that I know is self-taught. Though I still feel like I've barely been challenged by the compiler at this point in my Rust journey, I'm grateful to have learned about all the topics in this book! Especially since these aren't easy topics to teach, and I know there aren't many other Rust personalities trying to tackle them - at least as far as I've seen to date.

This book is NOT a rewrite of "The Book"

I see a lot of material out there that's, essentially, just a rewrite of the examples given in the Rust book. Or they're just reviewing the material as it's laid out in the Rust book. This book is definitely not that, I'm glad to say. I was worried about this. Beyond the basics of the language, which are inescapable, Rust In Action provides insights that aren't given in the Rust book.

Conclusion

I'd definitely recommend this book to anyone that's learning Rust, especially if they're unfamiliar with systems programming like I am. The primary advice I'd have for someone that's debating on whether they should buy this book is:

Don't expect it to challenge you against the compiler. If you're interested in learning general knowledge about Rust syntax, what Rust can do, and the basics of systems programming, then this is the perfect book to get started with!

Thank you for all your hard work Tim, it's sincerely appreciated!