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.

webass

 

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.

Verdict

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.

Banner


Learn dbatools in a Month of Lunches

Author: Chrissy LeMaire et al
Publisher: Manning
Pages: 400
ISBN: 978-1617296703
Print: 1617296708
Kindle: B0B39PCHL8
Audience: SQL Server DBAs
Rating: 5
Reviewer: Ian Stirk 

This book aims to make it easier to manage your SQL Server estate, how does it fare? 



T-SQL Fundamentals (Microsoft Press)

Author: Itzik Ben-Gan
Publisher: Microsoft Press
Pages: 608
ISBN: 978-0138102104
Print: 0138102104
Kindle: B0BTLBXF8V
Audience: T-SQL developers
Rating: 5
Reviewer: Kay Ewbank

Itzik Ben-Gan is a highly respected Microsoft Data Platform MVP, and the earlier editions of this book were already ver [ ... ]


More Reviews

Last Updated ( Tuesday, 05 January 2021 )