You would have to try hard to avoid hearing about WebAssembly/WASM. Hardly a day goes by without another article popping up.

Some years ago we used emscripten to turn a C/C++ game engine into JavaScript/WebGL for running in a web browser. Amusing, but the resulting mess was big, slow, and pretty painful to debug. Unity dialed this to 11: C# -> (via Mono) IL -> (via IL2CPP) C++ -> (via emscripten) JavaScript. They deserve a tip o’ the hat for that impressive bit of software engineering gymnastics, but I’m glad I never had to use it.

I’ve been curious about the tech behind WASM, but not being a web-frontend guy was only casually/passively interested. WASI changes that by embracing WASM outside the browser; another contender for the “write once, run anywhere” panacea.

The Rust Connection. Namely, why Rust? The Rust team made WASM a focus for 2018 because reasons. The crux of the argument being:

  1. Languages without runtimes are the best candidates for WASM (i.e. C/C++/Rust)
  2. Rust is better/safer/easier (especially for people coming from JavaScript) than C/C++

Perhaps subjective, but palatable with the right colored glasses (unless you’re a diehard C/C++ enthusiast). Are Rust and WASM the solution to all your problems? Probably not, but we can be interested in the tech regardless.

Rather than write a verbose treatise on WASM basics (of which there are many), thought I’d round up various resources and notes/browser tabs I’ve got hanging around.

Introduction to WASM:

WASI- WASM outside the browser:

Use cases:

Digging in:

Misc: