Author's note: Recurse Center blog posts condensed into a writing sample.
WebAssembly fulfils Java's founding promise of "write once run anywhere", with the JVM swapped out by the browser. Running the code in the browser effectively means the compiled .wasm binary is agnostic to the choice of processor and OS.
The first advantage is portability. Existing codebases can be compiled to WebAssembly to be run in the browser. The compiler tool chain with the most support for WebAssembly is LLVM; this benefits languages like C/C++ and Rust. In addition, these 'system languages' have smaller runtimes which in turn compile to smaller .wasm binaries.
Cool! What's the catch?
Got it. Anything else?
The WebAssembly project has now expanded beyond the browser, with wasmtime as an independent runtime and WASI as the unified systems interface. This could also make .wasm format the new standard in portable binaries, replacing .dylib/.so/.dll files for cross-language bridges.
One wonders, more broadly, if the technology will further consolidate the dominance that large tech companies have, or will a thousand startups bloom? Will there be a lot of end users who like it, but very few love? What will the killer app be, or for that matter, will there actually be one? Only time will tell, but we're excited to find out!
This post is a condensed 1-pager from the series https://payments.posthaven.com/tag/webassembly
The series builds on Lin Clark's excellent intros https://hacks.mozilla.org/2017/02/a-cartoon-intro-to-webassembly
For minimal examples on compiling and running WebAssembly https://github.com/savarin/minimal
To speed up Python with Rust via WebAssembly bridge https://github.com/savarin/bridge