WebAssembly in Action

Author: Gerard Gallant
Publisher: Manning
Date: November 2019
Pages: 448
ISBN: 978-1617295744
Print: 1617295744
Audience: Developers interested in WebAssembly
Rating: 5
Reviewer: Ian Elliot

WebAssembly is a hot topic is this the book to read?

Is WebAssembly a hot topic?

Are people actually using it?

These are difficult questions that would be answered by an aficionado in the affirmative, but the truth is, while we might want to know more, it isn't a widely used technology. What I mean here is that JavaScript use in all flavors outnumbers WebAssembly use by orders of magnitude. If you read this book to find out more you will quickly discover why. WebAssembly isn't yet tamed, let alone house-trained. Although there are ways of using it with other languages, it is best supported in C/C++ and this means that it's not for the average, or even advanced, JavaScript programmer or Web developer.

So the first conclusion is that this is not a book for the purely JavaScript programmer. However, it isn't for the purely C/C++ programmer either as to get anywhere with WebAssembly you have to write JavaScript to work with it.  Add to this that we are still talking about command line tools, and fairly underdeveloped tools at that, and you can see that this is not for the fainthearted programmer. If you want to get on the bandwagon before it gets comfortable suspension and air con, this could be the book for you.



Gerard Gallant starts off with a look at the ideas and history of WebAssembly. The first part of the book is very hot on explaining the ideas and if you are looking for a book that gets you hands-on from the outset this isn't it. You don't even get a hand-holding step-by-step to your first project. The installation of the many pieces of software that you need is relegated to an appendix - and you really need to read and struggle with this as soon as possible.

To give you some idea I quote:

Why would you not use a WebAssembly Module?

If the logic is simple the extra work to set up a compiler toolchain and write something might not be worth the effort.

Yes indeed - this is the barrier you have to overcome. In fact, the mere use of the term "toolchain" should have alarm bells ringing - here be lots of additional work. Assuming your toolchain is sound and hanging on, then the book does take you though creating and using a simple C function and calling it from JavaScript.

The second part of the book takes this further with explanations of how to talk to JavaScript in various ways and how to reuse your existing C/C++ code. Again, there is lots of explanation and a small number of examples.

The third part of the book covers what is not unreasonably called "advanced topics". Some of these are fairly mainstream - dynamic linking and threading both with pthreads and webworkers. There's one I have to admit that I hadn't even thought of - using WebAssembly with Node.js! Presumably this is my blind spot due to me thinking that WebAssembly's natural environment is the browser.

The final part of the book is about the sort of topics that wrap up many a programming book - debugging and testing.


This is a good book as it takes the space to explain the ideas. It also goes further into the technology than you might expect. It isn't a cookbook and it isn't a step-by-step guide and you had better be a capable programmer, both in C/C++ and JavaScript, to keep up. A good book for the good reader.


To keep up with our coverage of books for programmers, follow @bookwatchiprog on Twitter or subscribe to I Programmer's Books RSS feed for each day's new addition to Book Watch and for new reviews.


Python Machine Learning, 3rd Ed

Authors: Sebastian Raschka and Vahid Mirjalili
Publisher: Packt
Date: December 2019
Pages: 770
ISBN: 978-1789955750
Print: 1789955750
Kindle: B07VBLX2W7
Audience: Python devs interested in ML
Rating: 5
Reviewer: Mike James
A new edition of a good book on ML is worth a close look.

Classic Game Design, 2nd Ed

Author: Franz Lanzinger
Publisher: Mercury
Pages: 293
ISBN: 978-1683923855
Print: 1683923855
Kindle:  B07S3ZW1Z8
Audience: Beginners to creating desktop games
Rating: 3
Reviewer: David Conrad
Subtitled, From Pong to Pac-Man with Unity, this is a very odd book. Don't let that put you off because s [ ... ]

More Reviews

Last Updated ( Tuesday, 05 January 2021 )