Skip to Content
Home

Hands-on Rust

During the covid lockdowns here in the UK, I slowly started working my way through Herbert Wolverson's excellent Roguelike Tutorial - In Rust. I never finished it, but found his style of teaching very informative and engaging. When he wrote and published Hands-on Rust, therefore, it went straight on my 'to read list', though it has taken me a few years to actually get round to it.

As mentioned already, Wolverson has a very pleasant teaching style and is good at explaining fairly complex concepts concisely, but without glossing over too many details. Hands-on Rust is primarily a book about learning the Rust programming language, something that I am now fairly comfortable working in, but doing so through the medium of building computer games. It's definitely a book for beginners, but gives just enough detail to show what is possible and hint at further avenues of research. Some of the content is very similar to the Roguelike Tutorial, but it's approached in a way that is different enough that, if you've already read the tutorial, you'll still probably learn some new things from the book.

I have yet to finish working through all the chapters, but have finished my first read through. I thoroughly enjoyed it and would strongly recommend to anyone who wants an introduction to the Rust programming language, or game development. I would have liked some deeper coverage on NPC behaviours and simulation, but realise that might be a bit too in-depth for a beginners book; hopefully he'll see fit to make a sequel!

If I have a single criticism of what is otherwise an excellent book (aside from the usual typos), it is in the choice of technology stack for making the games. bracket-lib, Wolverson's own library for making simple games, is very user friendly and lends itself well to rapid prototyping and tutorials such as these. Legion, the Entity Component System used for the Dungeon Crawler game, however, is anything but and the syntax feels a bit clunky and counter-intuitive compared to most other Rust crates (packages); it's clearly a very powerful library, but that power comes at the cost of easy to read code. For a beginners book, I think something like specs might have been a better choice (Wolverson uses this in his excellent Roguelike tutorial); you might lose some performance and features overall, but that is probably a worthwhile trade-off for a beginner's book where code comprehension is so important.