Skip to content
April Meetup

Details

Dave Doherty- WebAssembly and You, Redux

JavaScript (JS) has been called "the assembly language of the Web." Perhaps it's more accurate to say that JS is the VM of the web (as Java's JVM tried, but failed, to be). What does this mean? JS is the target language that numerous JS extensions and variants (e.g., TypeScript, CoffeeScript, etc.) and other languages (e.g., C/C++, ObjC, C#, Python, Java, etc.) can be compiled to and run in a browser.

If the preceding paragraph sounds familiar, that’s because it’s lifted from the abstract from a NodeMN talk that I gave in April 2016 titled “Emscripten, asm.js, WebAssembly, and You.” WebAssembly, the real “assembly language of the Web,” has made a lot of progress since then — its Minimum Viable Product (MVP) specs were ironed out and all of the major browsers now support it. And even in its MVP state, it’s quite powerful, robust, and useful.

What is it? From the WebAssembly project page: “WebAssembly (abbreviated Wasm) is a binary instruction format for a stack-based virtual machine. Wasm is designed as a portable target for compilation of high-level languages like C/C++/Rust, enabling deployment on the web for client and server applications.”

Huh? Think of a computer processor’s low-level instruction set. Then think of how a (e.g., C++) compiler spits out binary applications using those instructions. Compared to interpreted language programs (e.g., JavaScript) these “native” binaries are fast. WebAssembly is a low-level instruction set to which you can compile high level languages as binaries that can now be run in any browser (or in node.js), usually alongside (usually UI) JavaScript code.

And it’s fast.

We’ll go over the basics of what WebAssembly is and why you might want to use it. Then we’ll build some examples that run both in the browser (front-end) and in node.js (back-end).

Photo of NodeMN group
NodeMN
See more events
SportsEngine
807 Broadway St NE, Suite 300 · Minneapolis, MN