Posted in Engineering

WebAssembly in 2026: Real-World Use Cases Beyond the Browser

WebAssembly (Wasm) was originally pitched as a faster way to run compiled code inside the browser alongside JavaScript. That’s still true, but it’s no longer the interesting part. The official WebAssembly specification was deliberately written to support “non-web embeddings” from the start, and a companion standard — the WebAssembly System Interface (WASI) — has spent the last several years building out exactly what Wasm needs to run well outside a browser tab: on servers, at the network edge, and inside plugin systems for products that have nothing to do with the web.

At a Glance

Use CaseWhat Wasm ProvidesReal Example
Server-side functionsA sandboxed, near-native-speed runtime for untrusted or multi-tenant codeShopify Functions (checkout customization, compiled from Rust or other languages)
Edge computingFast-starting, per-request isolated execution close to usersFastly Compute (custom code compiled to Wasm, run with per-request isolation)
Plugin systemsA safe way to run third-party extensions without native code accessExtism, an open-source, cross-language Wasm plugin framework
Portable system interfacesWASI: a standard, capability-based API for files, sockets, and clocks across hostsWASI 0.2/0.3 (Preview 2/3) and the Component Model

What WebAssembly Actually Is

Per the official specification at webassembly.org, “WebAssembly (abbreviated Wasm) is a binary instruction format for a stack-based virtual machine,” designed as a portable compilation target for languages like C, C++, and Rust. The spec names four core design goals: it should be efficient and fast, aiming for near-native execution speed; safe, running inside a sandboxed, memory-safe environment; open and debuggable, with a human-readable text format alongside the binary one; and portable, versionless, and backward-compatible across hosts. Critically, the spec states plainly that Wasm “supports deployment on the web… as well as non-web embeddings,” and that “WebAssembly also supports non-web embeddings” through a separate specification track.

WASI: The Standard That Makes “Beyond the Browser” Possible

A browser already gives Wasm code access to the DOM and Web APIs. Outside a browser, Wasm needs a different, standard way to talk to files, sockets, clocks, and other system resources — that’s what the WebAssembly System Interface (WASI) specifies. WASI is developed as a standards-track effort by the WASI Subgroup inside the W3C WebAssembly Community Group, and it has shipped three milestone releases so far, nicknamed Preview 1, 2, and 3 (WASI 0.1, 0.2, and 0.3). WASI 0.3 is the newest, adding native async support built around stream<T> and future<T> types. WASI works alongside the Component Model, a related specification for building interoperable, composable Wasm applications, and both are explicitly designed for a wide set of non-browser workloads: “web apps, plugins, serverless functions, database UDFs, embedded controllers, and sidecar networking filters,” per WASI’s own site. The security model is capability-based: a WASI module starts with zero ambient authority and can only touch what its host explicitly grants it — a meaningfully different default than a typical OS process.

Real Production Use Case: Server-Side Plugin Execution (Shopify Functions)

Shopify Functions is one of the clearest production examples of Wasm running business logic on a server rather than in a browser. Merchants (or third-party app developers) write custom logic — generating discount types, defining delivery options, or validating carts — compile it to Wasm, and Shopify runs it inside checkout. Shopify’s own developer documentation states that functions can be written in “any language that can compile to WebAssembly,” though “Shopify strongly recommends Rust as the most performant language choice.” Because the code runs inside a tightly bounded sandbox, Shopify can enforce hard resource limits directly on the compiled binary: up to 11 million Wasm instructions per execution for carts with up to 200 line items (scaling for larger carts), a 256 KiB compiled binary size cap, 10 MiB of linear memory, and 128 kB of input data. That’s the sandboxing and portability promise of Wasm doing real work: Shopify can run merchant-submitted code inside its own checkout flow without giving that code arbitrary access to the host system.

Real Production Use Case: Edge Computing (Fastly Compute)

Fastly Compute lets developers compile custom code to WebAssembly and run it across Fastly’s edge network, with each incoming request getting its own isolated Wasm instance. According to Fastly’s own product documentation, the platform is built around “per-request isolation and lightweight sandboxing,” and Fastly specifically credits its work with the Bytecode Alliance — the same open-source organization that stewards WASI and the Component Model — for expanding language support over time. The appeal at the edge is straightforward: Wasm modules are small and fast to instantiate compared to spinning up a full container or VM per request, which matters when a request might be served from any one of dozens of globally distributed points of presence.

Real Production Use Case: Plugin Systems

Before Wasm, letting end users or third parties extend a product with “plugins” usually meant either a restrictive scripting language or accepting the security risk of native code. Wasm’s sandboxing model is well suited to this problem, which is the whole premise behind Extism, an open-source project that describes itself as “the cross-language framework for building with WebAssembly” and “the open source, universal plug-in system.” Extism ships host SDKs for more than a dozen languages — including Rust, Go, Python, Java, Node, and .NET — so a plugin author can write in one language and a host application written in a completely different language can load and run that plugin safely, with the Wasm sandbox enforcing the boundary.

A Minimal WASI Example

To illustrate what a non-browser Wasm module looks like in practice, here’s a minimal Rust function compiled against the wasm32-wasip1 target. It takes no network or filesystem access by default — under WASI’s capability-based model, a host must explicitly grant any such access:

// src/main.rs
// Build with: rustup target add wasm32-wasip1
//             cargo build --release --target wasm32-wasip1
// Run with:   wasmtime target/wasm32-wasip1/release/greet.wasm -- "Ada"

use std::env;

fn main() {
    let args: Vec<String> = env::args().collect();
    let name = args.get(1).map(|s| s.as_str()).unwrap_or("World");

    // WASI grants no filesystem or network access unless the host
    // explicitly configures it — this module only touches stdout.
    println!("Hello, {}! This ran as a sandboxed Wasm module.", name);
}

Compiled this way, the resulting .wasm file can run unmodified on any WASI-compliant host — a CLI runtime like Wasmtime, an edge platform, or a plugin host like Extism — without recompiling for a specific operating system, which is the portability guarantee the specification is built around.

Trade-Offs to Know Before Betting on Wasm Outside the Browser

None of this makes Wasm a universal replacement for containers or native code. WASI itself is still mid-rollout — 0.3 only recently added native async support, and tooling maturity varies a lot by language and target. Resource limits like Shopify’s instruction-count cap exist precisely because Wasm sandboxes, while safe, still need an explicit ceiling to stop runaway execution. And server-side Wasm’s ecosystem of libraries and system bindings is still thinner than what’s available to a normal server process in Node, Python, or Go — code that depends heavily on OS-specific APIs or mature native libraries may not have a clean WASI equivalent yet.

Bottom Line

WebAssembly’s browser roots get most of the attention, but its design goals — sandboxed safety, near-native speed, and strict portability — turn out to matter just as much, if not more, outside the browser. WASI gives Wasm a standard way to talk to the operating system; real products like Shopify Functions and Fastly Compute are already running untrusted or third-party logic on servers and at the edge because of it; and frameworks like Extism are turning that same sandboxing model into a general-purpose plugin architecture. It’s not a drop-in replacement for containers yet, but it’s no longer a browser-only technology either.

FAQ

Is WebAssembly only for languages like C, C++, and Rust?
No — the spec defines Wasm as a general compilation target, and tooling now exists for many languages, though support quality and the size of the compiled output still vary a lot by language and toolchain.

What’s the difference between WASI and the Component Model?
WASI defines the system-facing APIs (files, sockets, clocks, and so on); the Component Model is a separate specification for building interoperable, composable Wasm applications, and WASI can be implemented by either plain Wasm modules or Component Model components.

Does Wasm outside the browser have access to the filesystem or network by default?
No. WASI uses a capability-based security model: a module starts with no ambient authority and can only access what the host explicitly grants.

Why would an edge platform like Fastly use Wasm instead of containers?
Fastly’s own documentation points to per-request isolation and lightweight sandboxing as the draw; Wasm modules are generally smaller and faster to instantiate than spinning up a full container per request.

Is WASI finished, or still changing?
Still changing. As of this writing, WASI has shipped three milestone releases (0.1 through 0.3), with 0.3 adding native async support — it remains an active, standards-track effort inside the W3C WebAssembly Community Group.

Sources

Unknown's avatar

Author:

Innovations, logic & design thinking