Unkernel
lastmod 2026-11-30created 2026-11-301 edits
unkernel is a project that builds the Linux 7.x kernel, complete with a real MMU, into a single WebAssembly module. It boots to a shell in under a second in a browser tab or Node.js. The kernel is not emulated but runs as compiled code, and only user programs are emulated, so aarch64 packages from Alpine and Debian can be installed and used without modification.
About
- User programs are executed by kwemu, an aarch64 CPU emulator (written in Zig) linked into the kernel, and hot code is JIT-compiled to wasm at runtime. Task switching uses JSPI
- Adding CPUs with
?cpus=Nuses one Web Worker per CPU. The default is half of the device's threads (up to 4 on desktop, 2 on Firefox and phones), and cross-origin isolation is required - The default distribution is Alpine 3.24.
--distro debianboots Debian 13 (about 57 MB), and--distro noneboots only a busybox shell. Packages are installed with apk or apt - The root file system is an overlay on a read-only image. In the browser, changes are kept on the page's ext4 disk and survive a reload. The CLI keeps them only in memory unless
--datais given - Networking uses the Linux TCP/IP stack with DHCP and DNS, and traffic goes out through a Wisp proxy in the browser or host sockets in Node. Tailscale is supported; IPv6 is not. Incoming connections to the guest are accepted only through
vm.fetch()over vsock and--forward - Supports a
/dev/fb0framebuffer, evdev input, and ALSA sound. On Debian, Mesa virgl uses the browser's WebGL2 as a GPU - The kernel reaches /init about 70 ms after starting, and the Alpine prompt appears in 0.3 seconds. The page download is about 10 MB, and Alpine runs in 48 MiB of guest memory. A getppid system call takes about 172 ns, compared with 110 ns natively and 1,662 ns on qemu-system
- Run it directly with
npx unkernelor embed it as an npm package. Browsers must support JSPI: Chrome/Edge 137+, Firefox 153+, macOS Safari 27+, or iOS/iPadOS 27 - The kernel is licensed under GPL-2.0 and the SDK under the MIT License
See also
- WebAssembly
- Linux
- Tabernetes - A Kubernetes cluster that uses browser tabs as nodes