Latest
Unkernel boots a full Linux kernel inside a browser tab using WebAssembly
Image: The Register

Unkernel boots a full Linux kernel inside a browser tab using WebAssembly

A new open-source project called Unkernel can boot a genuine Linux kernel inside an ordinary browser tab, and a follow-on effort called Trynix extends it to run NixOS, prompting talk that WebAssembly could eventually displace hypervisors and containers for some workloads.

Iranian developer Pooya Parsa announced Unkernel on X on 15 November and released version 0.2 on 19 November. It runs an Arm64 runtime written in Zig and compiled to Wasm, and that runtime boots the Linux kernel. The project’s README indicates it was developed with help from large language models.

Linux desktop running inside a web browser tab using the Unkernel project
Image: The Register

What it does

Visiting the Unkernel.dev page boots Debian 13 on a real Linux kernel within the tab. The virtual machine has 2GB of RAM and two virtual CPU cores. A simple Wayland-based graphical interface is included, with an app launcher opened by pressing Super+K. Users have also managed to run Doom on it.

Because the runtime is compiled to Wasm, the same binaries can in principle run on any host architecture, whether Arm, x86 or RISC-V, without a separate hypervisor.

Trynix and tabc

Developer Farid Zakaria built on the idea in a blog post titled “2035 came early”, introducing Trynix. Instead of Debian, it boots NixOS, giving access to the Nix package collection of nearly a third of a million programs and versions. Trynix supports Wayland, OpenGL and ALSA audio, so graphical and media software can run. Testers have launched Firefox on Linux inside Chrome on Linux, and Doom on a 15-year-old iMac.

Linux desktop running inside a web browser tab using the Unkernel project
Image: The Register

Michael Lohr’s SideBySide is an example of a more practical use. A single browser tab holds three panes running Firefox, Chromium and the WebKit-based Epiphany. Entering a URL loads it in all three engines at once, with no virtual machines involved.

Zakaria followed up days later with tabc, which treats browser tabs as a container runtime. On macOS, it lets developers run real Linux containers without a hypervisor or virtual machine.

A decade-old prediction

The projects echo a 2014 PyCon talk by Gary Bernhardt, “The Birth & Death of JavaScript”. Delivered as if from 2035, it imagined developers targeting a Wasm-like platform, which he called METAL, instead of traditional operating systems. Asm.js, which let compilers for other languages target JavaScript runtimes, evolved into Wasm in 2015.

Wasm has since proven capable of heavy workloads. LibreOffice was running on it by 2022, and Infinite Mac, which emulates classic Apple systems in the browser, now runs NeXTstep, early Mac OS X development builds and, as of last month, BeOS.

Docker founder Solomon Hykes said in 2019: “If WASM+WASI existed in 2008, we wouldn’t have needed to create Docker.” The new projects suggest that scenario is edging closer.

Early days

Unkernel is at version 0.2, and the demonstrations so far are largely proofs of concept. Doom is the headline application, though the SideBySide browser-testing tool and tabc’s hypervisor-free containers on macOS point to practical uses for developers.

Source: The Register