When WebAssembly (Wasm) became a W3C recommendation in December 2019, it was mostly described as "a way to run fast code in the browser". Two years on, it runs design tools, video editors and CAD applications on the web, and it is showing up in places that have nothing to do with browsers: edge computing platforms, plugin systems and server runtimes.
So is WebAssembly still a browser technology?
What WebAssembly is
WebAssembly is a portable binary instruction format. Code written in languages such as C, C++, Rust and Go is compiled to a compact .wasm module, which a Wasm runtime executes at close to native speed.
Its key properties:
- Fast: designed to be decoded and compiled quickly, with predictable performance.
- Portable: the same module runs on any compliant runtime, on any CPU architecture.
- Sandboxed: a module can only access its own linear memory and the functions its host explicitly gives it. By default it has no access to files, network or system calls.
- Language-neutral: it is a compilation target, not a language.
In the browser: bringing native apps to the web
The first wave of adoption was browser applications that needed performance JavaScript could not reliably provide:
- Figma compiled its C++ rendering engine to WebAssembly and reported large load-time improvements.
- Adobe announced a web version of Photoshop last October, built with WebAssembly and Emscripten.
- Google Earth and AutoCAD run large existing native codebases in the browser.
Wasm does not replace JavaScript. JavaScript handles the UI and orchestration; Wasm handles the heavy computation. A minimal Rust example with wasm-bindgen:
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
pub fn checksum(data: &[u8]) -> u32 {
// CPU-heavy work runs as compiled Wasm
data.iter().fold(0u32, |acc, b| acc.wrapping_mul(31).wrapping_add(*b as u32))
}import init, { checksum } from "./pkg/checksum.js";
await init(); // fetch and instantiate the .wasm module
const bytes = new Uint8Array(await file.arrayBuffer());
console.log(checksum(bytes));Beyond the browser: WASI
On its own, Wasm has no way to talk to an operating system. The WebAssembly System Interface (WASI) defines a standard set of capabilities (files, clocks, random numbers and, in progress, networking) that runtimes such as Wasmtime and WasmEdge provide outside the browser.
WASI follows a capability-based security model: a module only gets access to the specific directories or resources the host passes in.
# Run a WASI module that can see only ./data, and nothing else on the host
wasmtime run --dir=./data image-resizer.wasm -- ./data/input.pngThis is why Docker co-founder Solomon Hykes remarked in 2019 that if WASM and WASI had existed in 2008, Docker might not have been needed.
Where server-side Wasm is useful today
Edge computing. Platforms such as Fastly Compute@Edge and Cloudflare Workers run Wasm at the network edge. Wasm modules start in microseconds to milliseconds, which makes per-request isolation practical in a way that containers are not.
Plugin systems. Databases, proxies and applications use Wasm to run third-party extensions safely. Envoy supports Wasm filters, letting teams extend a proxy without recompiling it or trusting native code.
Portable, sandboxed functions. Running untrusted or customer-supplied code, such as user-defined functions and data transformations, inside a Wasm sandbox rather than a full container.
Where the hype runs ahead
- It will not replace containers any time soon. Most server software expects a full operating system, threads, sockets and a file system. WASI does not yet provide all of that.
- Tooling and debugging are improving but are less mature than native or container workflows.
- Language support varies. Rust and C/C++ are excellent; garbage-collected languages bring their runtime with them, making modules much larger.
- Interoperability between modules (the proposed "component model") is still being standardised.
Security considerations
Wasm's sandbox is a real strength: a module cannot access anything the host does not grant. But:
- the sandbox protects the host from the module, not the module from its own bugs. A memory-safety bug in C compiled to Wasm is still a bug inside the module,
- host functions exposed to modules become the attack surface, so keep them minimal and validate inputs, and
- runtimes are software too and need patching.
The bottom line
WebAssembly has already succeeded at its original goal: bringing high-performance applications to the browser. Its next chapter, as a secure, portable and lightweight runtime for the edge and for plugins, is well under way. It is unlikely to replace JavaScript or containers, but it is becoming the natural choice wherever you need fast, portable and sandboxed code.
Our secure SDLC team builds performance-critical web and edge components, including with Rust and WebAssembly.