In March 2013 Solomon Hykes showed Docker in a five-minute talk at PyCon. Within a few years the container was what everyone shipped: build an image, push it to a registry, run it anywhere Linux runs. Thirteen years later we still ship that unit. I think the next one is already here, and it’s smaller.
Each step in the history of servers took something out of the package. A virtual machine carried a whole operating system, kernel included. A container dropped the kernel and shared the host’s. A WebAssembly component drops the operating system altogether: you ship your compiled code and a list of what it needs from outside, and nothing else. This post explains that unit, shows what it saved when we measured it against containers, says plainly where it still falls short, and sets out how I think the two should run side by side under one orchestrator written in Rust.
New to some of the terms? Our container basics explain them: image layers, registries, runc, and containerd vs Docker.

What each step took out
The virtual machine was the unit from about 2006. It carries everything: a kernel, init and its services, a userland, your language runtime and your code. Its wall is hardware virtualization, which is strong. Its cost is that every VM boots a kernel and keeps memory for a whole operating system. Kiri’s own small VM boots in 112 ms, which is a fast case; a cloud VM takes seconds.
The container dropped the kernel. Linux gives a process its own view of the system with namespaces and its own limits with cgroups, and the image carries only the userland your program expects. Starting one is a short list of kernel operations. Measured one at a time in Kiri’s benchmarks: a fork and exec takes 0.54 ms, 0.78 ms with four namespaces and 1.15 ms with a network namespace too; a cgroup takes 1.23 ms, an overlay mount 0.36 ms and a virtual network device 2.2 ms. A good engine starts and removes a container in 2.55 ms. Containers aren’t slow.
What a container still carries is a Linux it mostly doesn’t use, and a door into the whole kernel. A program in a container can make any system call the kernel offers unless a seccomp filter says no. On x86-64 that is about 390 calls; we counted them in the kernel’s system call table. The model is a deny-list: everything is reachable until something blocks it. We wrote about what that means for untrusted code in a container is not a sandbox.
The WebAssembly component drops the operating system. WebAssembly (Wasm) is a portable instruction format. An engine such as Wasmtime compiles it to machine code and runs it inside its own block of memory. The code can’t see anything outside that block, and there are no system calls to make. Everything it needs from outside comes through imports.
WASI, the WebAssembly System Interface, defines those imports: files, clocks, random numbers, sockets, HTTP. Each is an interface a component imports by name, and the host decides which ones to provide. If the host doesn’t hand a component a directory, there is no call it can make to open one. The model is an allow-list.
The component model then lets components in different languages link to each other through typed interfaces, written in a small language called WIT. This is the whole list of what a policy check needs to reach:
package team:check;
world check {
import wasi:http/outgoing-handler@0.2.0;
export check: func(image: string) -> result<_, string>;
}
You can build one yourself in a minute with Rust:
rustup target add wasm32-wasip2
cargo new hello && cd hello
cargo build --release --target wasm32-wasip2
wasmtime run target/wasm32-wasip2/release/hello.wasm
ls -lh target/wasm32-wasip2/release/hello.wasm # compare with your smallest image
What we measured
On 20 November 2026 we wrote one small program five ways: a check that blocks container images that have no version tag. We ran each version inside Kiri’s Linux VM on an Apple silicon Mac. The WebAssembly versions ran in a Rust host that embeds Wasmtime 25 as a library.
| How it runs | On disk | Idle memory | One call |
|---|---|---|---|
| Python, in a container | 17.4 MB image | 12.6 MB | n/a |
| Go, in a container | 2.4 MB image | 5.8 MB | n/a |
| Rust, as Wasm | 91 KB | 1.0 MB, or none if loaded per call (0.3 ms) | 0.02 ms |
| TinyGo, as Wasm | 473 KB | 1.1 MB, or none (0.4 ms to load) | 0.08 ms |
| Go, as Wasm | 3.2 MB | 1.3 MB, or none (0.9 ms to load) | 0.64 ms |
The engine itself costs about 2 MB once, shared by every component. Ten such programs come to about 13 MB as WebAssembly, against about 58 MB as Go containers and about 130 MB as Python containers. The containers ran all the time, waiting for work; the WebAssembly versions ran only when called. The container runtime’s own process for each container isn’t in these numbers, so the real gap is a little wider.
Two things we didn’t expect:
- Compile ahead of time. Compiling WebAssembly inside the running process cost 9 to 61 MB, mostly the compiler’s working memory left behind. Compiling once at install, in a separate step, and loading the ready-made code avoids that.
- Plain Go is fine. Standard Go compiles to WebAssembly and runs correctly. TinyGo is smaller, but you don’t need it.
These numbers come from one small program on one machine. We haven’t measured CPU-heavy work, so don’t read them as a general speed claim. What they show is the size of the unit.
Why now, and not in 2019
In March 2019 Solomon Hykes wrote that if WebAssembly and WASI had existed in 2008, Docker wouldn’t have been needed. “Webassembly on the server is the future of computing,” he wrote. “A standardized system interface was the missing link.” The next day he added: “‘So will wasm replace Docker?’ No, but imagine a future where Docker runs linux containers, windows containers and wasm containers side by side.”
In 2019 that interface was a preview. Since then it has shipped:
- WASI 0.2 launched on 25 January 2024, built on the component model.
- WebAssembly 3.0 was announced on 17 September 2025, with garbage collection, 64-bit memory, exception handling and tail calls, so languages with their own runtimes fit better.
- WASI 0.3 shipped on 11 June 2026 with native async: streams and futures are now part of the component model. Wasmtime 46 and later turn it on by default.
- Python has been a tier 2 platform on WASI since CPython 3.13.
And it runs in production. Fastly Compute runs WebAssembly and creates a sandbox for each request in microseconds. Shopify Functions run merchants’ custom logic as WebAssembly. Akamai bought Fermyon, the company behind the Spin framework, in December 2025 to build functions on it.
The work changed too. An AI agent calls tools many times an hour, and the code behind a call is often code the agent wrote a minute ago or a stranger published last week. Each call wants a fresh wall that starts instantly and is gone afterwards, with access to exactly the things the call needs. A container per call is heavy for that. A WebAssembly instance per call is the right size. We covered the questions to ask about an agent’s access in what your AI agent can reach.
Where it falls short today
WebAssembly won’t run most of what’s in your Compose file, and it’s worth being exact about why.
- Existing programs. Postgres, Redis, and anything that forks processes, opens raw sockets or reads
/procwon’t run as a component without real porting. That is most server software. - Threads. wasi-threads is now a legacy proposal for WASI 0.1 only. Its replacement for 0.2 and later, shared-everything threads, is still a phase 1 draft. A component can’t yet spread one task across many cores the way a native program can.
- Big runtimes. Languages that bring a large runtime give back part of the size win. In our test, Go’s WebAssembly build was 35 times the size of Rust’s on disk (3.2 MB against 91 KB). Python works, but it brings its interpreter with it.
- Devices. There is no general way to hand a component a GPU or a USB device.
- Tooling. Docker Desktop’s Wasm workloads, a beta since version 4.15, are now deprecated and no longer actively maintained. Debuggers and profilers lag well behind what you have for containers.
- Start-up claims are mostly vendors’ own. Akamai says Spin functions start in less than 0.5 ms, and the Wasmtime team cut the instantiation of one large module from about 2 ms to 5 microseconds in 2022. Our own figure is 0.3 ms to load a small component and 0.02 ms per call. Measure your own.
So WebAssembly doesn’t replace containers, in the same way containers didn’t replace virtual machines. Most containers in the cloud run inside VMs today. Each new unit became the default for new code that didn’t need what the older one carried, and left the older one underneath for everything else.
One workload, two shapes

Most of the pieces to run both exist already.
- Registries hold both. The CNCF’s Wasm OCI artifact layout stores a component in an ordinary registry, as one layer of type
application/wasmwithwasmas its architecture andwasip2as its OS. The same tags, the same pull, the same signing. - containerd can run them. runwasi provides containerd shims for Wasmtime, Wasmer, WasmEdge and WAMR, and Kubernetes can pick a runtime per pod with a RuntimeClass. SpinKube (CNCF sandbox since January 2025) and wasmCloud (CNCF incubating since November 2024) build on these ideas.
What I’d change is the default. Today WebAssembly is fitted into a stack built for containers. In Kubernetes a Wasm workload still lives in a pod, with the pod’s network namespace and a shim process to manage it. You pay a container’s overhead to run a 1 MB program.
The orchestrator I want reads each artifact’s media type and picks the shape:
- A component runs in a Wasm engine built into the node’s agent. One process holds thousands of instances, each created for a request and dropped after it. Its imports come from what the deployment grants, and nothing else is reachable.
- A Linux image runs as a container, exactly as it does today.
- Both get the same API, the same network names, the same logs and the same limits. A team can move one service at a time from container to component without changing how they deploy it.
It should be written in Rust, for three reasons. Wasmtime is written in Rust and embeds as a library, so the orchestrator and the engine are one program with no foreign-function boundary between them. The one process that holds every tenant’s instances should be memory-safe without a garbage collector pausing it. And Rust compiles to WebAssembly well itself, so one language builds both the orchestrator and the small units it runs.
What this amounts to
These are predictions, not facts.
- The default moves for code that needs little from Linux. Web APIs, functions, webhooks, policy checks, plugins and agent tools start as components. A container becomes what you reach for when you need a full Linux.
- Density goes up several times. Ten programs in 13 MB instead of 58 MB or 130 MB. On a server that mostly runs idle services waiting for work, that’s several times more per machine, and scaling to zero stops costing a cold start anyone notices.
- Security flips from deny-list to allow-list. A container can call anything the kernel offers unless a filter stops it. A component can call only what it was given. For code an agent wrote a minute ago, that’s the right default.
- Multi-architecture images fade for this code. One
.wasmfile runs on amd64 and arm64, with no emulation on an Apple silicon Mac. - Containers stay for the big things: databases, old services, GPU jobs. VMs stayed underneath containers in the same way.
In 2013 we got a box that carried an operating system, so code would run anywhere. The next box carries only the code, because the machine underneath has learned to provide the rest.
Where Kiri stands
Kiri runs Linux containers today, through Docker’s API, and its engine is already written in Rust (what is Kiri explains how it’s built). Running WebAssembly components next to containers, under the same commands, is the direction we’re building in. We’ll write about each piece as it ships, with the numbers.
In short
- Each unit of compute took something out: the VM carried an OS, the container shared the kernel, and a WebAssembly component carries only your compiled code.
- In our test the same small program was 91 KB and 1.0 MB idle as Rust WebAssembly, against a 2.4 MB image and 5.8 MB idle as a Go container.
- A component reaches only the WASI imports it’s given. A container reaches the whole kernel unless something blocks it.
- WASI 0.2 (2024), WebAssembly 3.0 (2025) and WASI 0.3 with async (June 2026) closed most of the gaps from 2019. Threads, devices, tooling and existing software are still open.
- WebAssembly won’t replace containers. It becomes the default for code that needs little from Linux, with containers kept for programs that need a real Linux, under one orchestrator that runs both.