In 2021, I predicted that WebAssembly (sometimes known as Wasm) would “help devs achieve painless global scale for workloads” and “that a major package in use today will get ported to WebAssembly and incorporated in a JavaScript library.” While it’s too early to declare victory on these predictions, I am confident that bytecode is back and WebAssembly is here to stay. So, what does this mean for you?

While WebAssembly emerged from a desire to improve the performance of computationally intensive browser apps, it can do much more than that. In practice, there are at least three ways in which developers can use it to transform their products and processes:

  1. WebAssembly liberates web development from the constraints of JavaScript. WebAssembly’s universal acceptance on major browsers means non-JavaScript code can be compiled to run anywhere. A good example of this is the design tool Figma, written in C++ and compiled to WebAssembly with the Emscripten compiler. This made the transition from desktop to browser much smoother, as well as made Figma load three times faster. Whether you’re building a new product or trying to bring an existing product to the web, you can write in your choice of many languages and rest easy in the knowledge that your app will run at near-native speed on all major browsers.
  2. WebAssembly accelerates your server-side functions and services. WebAssembly virtual machines (VMs) don’t all require a browser. Some VMs start in microseconds and, unlike containers, can run as a single process in a sandbox. This makes them ideal for running serverless functions. Fastly reports that it can set up and tear down a WebAssembly VM in less than 60 microseconds, compared with the hundreds of milliseconds that traditional containers take.
  3. WebAssembly enables portability and sandboxes. Although WebAssembly was designed to improve the performance of browser-based apps and works well for server-side functions and services, it turns out that a lot of scenarios benefit from platform neutrality and sandbox security. I spoke to one stealth startup that uses WebAssembly just to abstract away the underlying hardware. This lets them create a single build rather than a separate build for each architecture. As demonstrated by the Microsoft Flight Simulator software development kit and Envoy’s packet filters, a good sandbox and portable bytecodes let any application accept arbitrary user code — even where executing arbitrary machine code could be a security risk.

In short, WebAssembly can make your browser applications faster. But it can also do a lot more. To learn more about WebAssembly, see Forrester’s WebAssembly: A Quiet Revolution and WebAssembly Wisdom: Best Practices For Wasm Wizards.

Written with Zachary Stone, research associate