WOAH
A full-screen Debian terminal with a welcome banner and a shell prompt, running inside a browser tab

Machines

A full Debian Linux boots in this tab with no server behind it

WebVM runs a real Debian userland client-side through CheerpX, an x86-to-WebAssembly JIT. You can compile C with gcc, and nothing on a server ran your code.

The tab finishes loading and there is a shell prompt waiting, blinking, user@:~$. You can type gcc -o hello hello.c and it compiles. You can run python3, open vim, poke around a real filesystem.

Here is the part that should stop you. None of that ran on a server.

WebVM, from Leaning Technologies, is a full Debian Linux userland executing entirely inside your browser tab. The project is Apache-licensed and sits on more than seventeen thousand GitHub stars, and the engine underneath it is CheerpX, an x86 virtual machine that exists nowhere except WebAssembly.

A JIT that eats x86 and emits WebAssembly

Emulation is the wrong word for most of what CheerpX does. Booting a vintage Mac in a tab means imitating hardware nobody ships anymore, and slow is part of the charm. WebVM has to run gcc, unmodified, at a speed you would tolerate.

So, per the team's own writeup, CheerpX runs two tiers. An interpreter executes the rarely-touched paths and, as it goes, maps the structure of the hot ones. Hot code is handed to a JIT that generates brand-new WebAssembly modules on the fly, so the actual x86 of gcc and python3 and vim ends up running as freshly minted Wasm. The engine itself is C++, compiled with the company's own Cheerp compiler.

Then there is the lying. A browser tab is a sandbox with no operating system underneath, and every syscall a Linux program expects, open a file, fork a process, allocate memory, has to be faked convincingly enough that a compiler toolchain believes it is on Linux. CheerpX carries a full Linux-syscall emulation layer for exactly that, which is why the terminal is not a recording or a thin client to a machine in a datacenter. The machine is the tab.

The filesystem is the same sleight of hand at the block level. The Debian system is a standard ext2 disk image sitting on a CDN, and the tab pulls down only the blocks you actually touch. Writes never leave your browser: modified blocks land in an IndexedDB overlay, so your edits persist between visits and the server never sees a byte of them. The whole scheme rests on SharedArrayBuffer, which is why the page runs cross-origin isolated.

By WebVM 2.0 the same engine boots Xorg and a complete graphical desktop, an Alpine Linux running the i3 window manager, from root filesystems past a gigabyte. The terminal turns out to have been the opening act.

Networking is the one honest asterisk: to reach the outside internet the VM routes through Tailscale, carried over WebSockets, so the little status dot starts orange and only goes green once you connect an exit node. Everything else is local.

You can also build one of these yourself, which still feels wrong to type. The CheerpX getting-started guide walks you from a script tag to a bash prompt running in your own page in about thirty lines of JavaScript.

More of the browser doing things it was never meant to: the phone in your pocket outruns a 1997 supercomputer.

Next up

A PDF file can run Doom, and that is the boring version