← Home

Unkernel: A Real Linux Kernel Running in the Browser

Unkernel: A Real Linux Kernel Running in the Browser

In November 2026, developer Pooya Parsa (known as pithings) released unkernel, a project that reads like science fiction: a complete Linux 7.x kernel, compiled to WebAssembly, running inside a browser tab. This is not a virtual machine, not kernel emulation — the Linux kernel itself was compiled to wasm, and what runs on the client is native code executing syscalls, scheduling, memory management, and the ext4 filesystem.

What unkernel is

Unkernel is described as "Linux 7.x built as a single wasm module with a real MMU." The core idea is simple in theory, brutal in execution: compile the Linux kernel directly to WebAssembly. The kernel code — syscalls, scheduler, memory management, TCP/IP, ext4 — becomes compiled code, not emulated. Only user programs are emulated, through kwemu, an aarch64 CPU emulator written in Zig and linked alongside the kernel.

When you open the unkernel page, you download about 10 MB and already have a complete Linux machine with a shell, package manager, persistent disk, internet access, and even sound. The kernel reaches `/init` in about 70 ms after starting. The Alpine prompt appears 0.3 s after node is launched. The system runs with 48 MiB of guest memory.

Performance at near-native cost

The performance numbers are what grab attention most. Fork, an operation frequently expensive in emulated environments, happens in about 60 µs — faster than the ~70 µs measured on native hardware and dramatically below the ~1.2 ms of qemu-system. Syscalls like `getppid` sit at ~170 ns vs ~110 ns native and ~1.7 µs on qemu. A 64-byte read also lands at ~170 ns.

For user code, the project includes a JIT that compiles aarch64 to wasm at runtime. Hot code (including AES, PMULL, and SHA instructions that OpenSSL uses) is compiled on demand, yielding ~3,900 MIPS in an integer loop vs ~270 on the interpreter alone. OpenSSL in the guest runs AES-128-GCM at ~100 MB/s and SHA-256 at ~160 MB/s.

The fundamental difference from earlier projects — JSLinux (2011), v86, WebVM — is that the kernel is not emulated. It is compiled. This means unkernel has a real MMU, with Sv39 page tables (arm64). fork, mmap, copy-on-write, shared memory, threads, and signals behave exactly as on hardware. It is not a NOMMU port.

Why this matters

The primary practical application of unkernel is not replacing the server — it is eliminating the need for it. Developers can embed a Linux machine inside their applications without provisioning anything on the backend. An interactive tutorial, a code playground, an onboarding environment: all runs client-side, isolated by WebAssembly, with zero per-visitor server cost.

Farid Zakaria demonstrated this in practice on his blog, using unkernel as a container runtime in Chromium tabs. His `tabc` project works like `runc`, but each container runs in a tab: `docker run --runtime tabc alpine` prints `Linux aarch64` and works even on a Mac without Docker, QEMU, or a Linux VM. It is the same `docker run` that runs on a real Docker daemon, using browser isolation to replace kernel-level isolation.

This has profound implications for development and CI/CD environments. Imagine running CI jobs inside a developer's browser, eliminating runner servers. Or offering interactive container demos without infrastructure cost. Or creating sandbox environments for security training where the browser itself is the isolation boundary.

What's missing

The project is still in early stages (v0.2.0), licensed under GPL-2.0, and written primarily in TypeScript for the integration layer. JIT for heavy user code still lags behind native for CPU-intensive workloads. The npm package already has 16 versions in a few weeks, indicating rapid development but also instability.

The author openly acknowledges: "CPU-heavy work is still well behind native." For I/O tasks, syscalls, and network I/O, unkernel competes side by side with native. For intensive computation, it remains a proof of concept.

The broader landscape

Unkernel is not the first to attempt running Linux in a browser — Bertrand Mollier's JSLinux (2011) and Marc Schriefer's v86 are direct ancestors. The difference is that they emulated the entire kernel in WebAssembly. Unkernel compiles the kernel and emulates only the user. This shift in the boundary between "compiled" and "emulated" is what makes the project viable for production.

The project also connects to a larger trend of WebAssembly runtimes for containers: Wasmer WASIX, StackBlitz's WebContainers, BrowserPod. But none of them compile the kernel. All rely on a WASI or JavaScript runtime for syscalls. Unkernel is unique in having the real Linux kernel, compiled, executing native code in the wasm engine.

The question: if a full Linux kernel runs in the browser at near-native cost, what remains for the servers we provision today for every user? The answer is likely not "nothing" — there are physical limits to what a browser can do. But the boundary is moving, and unkernel shows which direction it goes: from server to client, from provisioned to instant, from costly to free.

Sources: GitHub, Hackaday, Farid Zakaria's Blog

✓ Independent sources cross-checked and verified before publishing