I break down the benefits, what's currently supported, who's using it, and some of my predictions.
- Cross-compile languages to binaries that can be executed natively on the Web in browsers.
- Portable sandboxing of untrusted code (browser or server-side)
Programming languages with production-level WASM support
- Go (Native toolchain, TinyGo)
- C/C++ (Emscripten)
- C# (Blazor)
- Rust (Native toolchain)
Zoom. Zoom uses WebAssembly SIMD (single instruction, multiple data) to optimize audio/video codecs and image processing. When Zoom creates a virtual background or decoding audio, it is using WASM. There were already standards for real-time communication on the Web through WebRTC. Still, Zoom needed to access low-level APIs to provide the desired level of performance (which is why Zoom seems to work so much smoother than past video conferencing solutions).
New Ideas and Predictions
Wasmer provides a runtime to execute WASM for running on different operating systems or embedding it into other languages.
The value proposition of server-side WASM is the portable execution of untrusted code. Here's was Docker co-founder Solomon Hykes had to say in 2019 about WASI vs. containers.
Tensorflow.js ships with a WASM backend for running machine learning models in the browser. Smaller image and face recognition models can run quickly in the browser using WASM.
Lingua Franca of the Web. WASM can become the bridge between the best-of-breed software libraries written in different languages. Whether that results in Python and Lua libraries being used natively in the browser or a package or plugin system that lets developers call other languages easier, WASM will play a significant role in uniting disparate programming communities.