In 2014, at PyCon, Gary Bernhardt gave a talk called The Birth & Death of JavaScript. It is told as a look back from the year 2035. Farid Zakaria calls its best joke "a browser running inside another browser."

On November 23, 2026, Zakaria published a post titled "2035 came early". It shows Firefox running on Linux, inside a Firefox tab, loading a page that boots Firefox again. The post reached about 1,000 points and 374 comments on Hacker News.

The engine behind that demo is unkernel, a project by Pooya Parsa. This article explains what it is, why it is faster than the usual approach, and three ways to try it today. I have not benchmarked it myself. The numbers below come from the project README and the trynix benchmark page, and each one is labeled.

What unkernel is

The README describes it in one line: "A real Linux kernel, compiled to WebAssembly. It boots to a shell in less than a second."

Three details explain the design:

  • The kernel is compiled, not emulated. It is Linux 7.x (the license section names Linux 7.3.4 plus patches) built as a single wasm module. Syscalls, the scheduler, memory management, ext4 and TCP/IP all run as compiled WebAssembly code.
  • Only user programs are emulated. Programs are unmodified aarch64 (64-bit ARM) Linux binaries. That means regular Alpine and Debian packages run as they are, with no rebuild.
  • It has a real MMU. An MMU (memory management unit) is the hardware that maps a program's memory addresses to physical memory. unkernel implements real page tables, so fork, mmap, copy-on-write, shared memory, threads and signals behave as they do on hardware.

The GitHub repository was created on November 12, 2026. A Hacker News thread about it on November 17 reached 219 points. The project is GPL-2.0-or-later, and the JavaScript SDK and web page are MIT licensed.

Four ways to run Linux in a browser

The README has a short section on how other "Linux in the browser" projects work. There are roughly four approaches.

1. Emulate a whole PC, kernel included. Examples the README names: v86, JSLinux, container2wasm and QEMU's wasm build (qemu-wasm). This is faithful, because the real kernel runs. It is also slow, because every syscall and every page fault (the event when a program touches memory that is not mapped yet) goes through emulated hardware.

2. Emulate the CPU and reimplement the syscalls. Programs run on an emulated CPU, but there is no Linux kernel. A runtime answers the system calls instead. This is fast, but it covers only as much of Linux as the runtime implements.

3. Compile programs to wasm and give them POSIX calls. The README lists Wasmer WASIX, WebContainers and BrowserPod in this group. It is fast, but native programs must be rebuilt for wasm, and fork (and anything else that needs an MMU) breaks or is approximated.

4. Compile Linux to wasm without an MMU. Projects like linux-wasm run the real kernel as native wasm. But without an MMU, user programs must also be rebuilt for wasm, and they are limited to vfork-style process creation.

unkernel's mix: take the compiled kernel from approach 4, add a real MMU, and emulate the user programs the way approach 1 does. You get the real kernel at wasm speed and unmodified binaries on top. The README credits Kernarium for this idea and linux-wasm for the arch/wasm port the kernel grew from.

How the design works

Here is the path a program takes, based on the "How it works" section of the README.

The CPU emulator lives inside the kernel. User programs run on kwemu, an aarch64 CPU emulator written in Zig and linked into the kernel. kwemu walks the kernel's own page tables. So memory management is done by the real Linux code, not by the emulator.

Syscalls do not go through emulated hardware. When a program makes a syscall, kwemu returns to the kernel, which handles the call as native wasm. In the README's words, there is "no emulated trap and no emulated kernel mode in between." The README's argument is that much of what makes a system feel slow lives in the kernel, and here that path runs at wasm speed. In a whole-PC emulator, the kernel itself runs through the same slow translator as the program.

Task switches use JSPI. JSPI is JavaScript Promise Integration, a WebAssembly feature that lets wasm code pause while it waits for something asynchronous and continue later. unkernel uses it (WebAssembly.Suspending) so the kernel gets real stacks it can suspend and resume. The README's browser list starts at recent versions: Chrome and Edge 137+, Firefox 153+, and Safari 27+. Browsers without JSPI get a page that says what is missing.

There are two speed tiers for user code. Guest code is first decoded once into compact operations and run by an interpreter. Hot code (code that runs often) goes to a second tier: a JIT (just-in-time compiler) that turns those blocks into wasm modules while the program runs. The README says the JIT output matches the interpreter "bit for bit."

Devices are small drivers that talk to JavaScript. Disk (kwblk), network (kwnet), display, input and sound (kwfb, kwinput, kwsnd), vsock and shared memory are each a small paravirtual driver. Paravirtual means the guest knows it is in a virtual machine and uses a simple interface to the host instead of pretending to drive real hardware.

What the numbers say

All numbers in this section are the project's or the trynix author's own measurements. Treat them as reported results, not independent tests.

Syscalls and fork, from the README (measured under Node on 2026-11-14):

  • getppid takes about 172 ns. Native Linux takes 110 ns, and qemu-system takes about 1,662 ns.
  • A 64-byte read from /dev/zero takes about 172 ns, against 161 ns natively.
  • fork + exit + wait takes about 57 µs, against 73 µs natively and 1,178 µs under qemu-system. The README notes that in this test fork was faster than native.
  • The kernel reaches /init about 70 ms after it starts. The page downloads about 10 MB, and Alpine boots in 48 MiB of guest memory.

Pure computation is a different story. The README is plain about it: CPU-heavy programs are "well behind native." The interpreter runs integer code at about 250 to 300 million guest instructions per second under Node. The JIT makes real Alpine work 1.6 to 2.3 times faster than the interpreter alone. For example, seq 100000 | sort -r took 3.1 s with the JIT against 7.1 s without it.

Real packages, from the trynix benchmark page. Zakaria's trynix site runs Nix packages in the browser. It used a patched QEMU engine before switching to unkernel as its default in November 2026. Its benchmark page has one run that measured both engines back to back on the same machine on 2026-11-25. Cold-start times (first run in a fresh guest):

  • hello: 1.14 s on QEMU, 0.17 s on unkernel (6.9x)
  • rg --version (ripgrep): 0.95 s against 0.07 s (13.5x)
  • python3 -c 'print(1)': 5.25 s against 1.08 s (4.9x)
  • opencode --version: 180 s against 30.5 s (5.9x)
  • Boot to a shell: 5.27 s against 2.87 s (1.8x)

The page gives one caveat: the two engines run different builds of each package, x86_64 on QEMU and aarch64 on unkernel. Zakaria's post says the gains are largest "on first runs where kernel work dominates," and sums them up as 2x to 32x faster "depending on the workload."

How to try it

There are three ways, from no setup to a few lines of code.

1. In a browser tab

Open unkernel.dev. After a download of about 10 MB you get a desktop with a terminal. Changes are saved in your browser. The page boots Debian by default, and Settings lets you switch to Alpine or to a bare base shell.

The page takes URL parameters. A few useful ones from the README:

  • ?mem=512 sets guest memory in MiB
  • ?net=0 boots without a network
  • ?jit=0 runs the interpreter only (useful to see what the JIT buys you)
  • ?data=0 gives you a fresh system every time, with no persistent disk

If you want Nix packages instead, trynix.dev puts the package in the URL. Zakaria's post links demos for solitaire, GL gears, curl and Firefox. Be patient with the Firefox one: his post warns that the nested Firefox-in-Firefox demo "took over 4 hours," with JIT disabled in the inner Firefox and GL off in the middle one. One commenter reported that Firefox took about 5 minutes to launch on an 8 GB Android phone, much of it spent downloading dependencies, and then did not react to input.

2. From a terminal

The same kernel runs under Node. The README's quick start:

npx unkernel 

This boots Alpine with networking over your host's sockets. Press Ctrl-] to quit. The first run downloads the Alpine image (about 4 MB) and caches it in ~/.cache/unkernel. Some flags from the README:

npx unkernel --distro debian # Debian 13 instead (about 57 MB, downloaded once) npx unkernel --mount .:/work # this directory at /work in the guest npx unkernel --forward 8000:80 # host 127.0.0.1:8000 to port 80 in the guest npx unkernel --timeout 60 --input '{8}uname -a\n{2}poweroff\n' # scripted run 

The scripted mode is the useful one for automation. The CLI types input on a schedule, stops on a timeout, and reports how the guest ended in its exit code: 0 for power off, 124 for timeout, 253 for a kernel panic, and so on.

3. From your own JavaScript

The SDK is published on npm as unkernel (latest version in the npm registry at the time of writing: 0.2.0-261124-75694e2). This is the README's smallest example:

import { createKernel, fetchDistro } from "unkernel"; const vm = await createKernel({ distro: await fetchDistro("alpine") }); // Alpine, no network vm.onOutput((bytes) => process.stdout.write(bytes)); vm.write("uname -a; poweroff\n"); const { code, kind } = await vm.exited; // 0, "halt" 

To run a single program and capture its output, the SDK has exec(), which works like Node's child_process:

const { stdout, exitCode } = await vm.exec("uname", ["-a"]); 

Networking is off unless you pass a net option. On Node, directBackend() uses the host's sockets. In a browser, you use a Wisp backend.

Why the browser needs a relay for networking

Browsers cannot open raw TCP sockets. So in the browser, unkernel sends the guest's traffic through a Wisp proxy. Wisp is a protocol that carries many TCP connections over a WebSocket. Zakaria's post describes it as "each TCP connection goes over one WebSocket to a Wisp relay."

Two practical points follow from this:

  • The default relay accepts only known origins. If you host the page yourself, the README says to point ?wisp= at your own proxy.
  • Your browser's network tab will not show guest traffic as normal requests. A commenter on HN noticed that curl downloads inside the guest did not appear in Firefox's Network tab. That fits the design: the traffic rides inside the WebSocket to the relay.

The README also lists networking limits: no IPv6, no UDP beyond DHCP and DNS, and no inbound connections. To reach a server running inside the guest, you use vm.connect(), vm.fetch() or the CLI's --forward, which go over vsock (a host-to-guest channel) instead of the network.

What it is good for, and what it is not

The HN threads asked the obvious question. One commenter wrote: "What do people foresee this being used for?" and added that similar projects often end with "oh its not actually realistic to use this in production because..."

Based on what the README offers, these uses are reasonable today:

  • Package and tool demos. trynix already does this: a link that opens a working shell with your tool installed, and no install for the reader.
  • Teaching Linux. A student gets a real kernel with /proc, epoll, cgroups and overlayfs in a tab, and a safe mode to recover a broken system.
  • Scripted tests against real Linux behavior. The CLI's timeout, scripted input and exit codes fit an automated test. Because the kernel is real, edge cases behave as Linux does.
  • Embedding a shell in an app. The SDK can mount host directories, share memory with the guest, and talk over vsock, with no network in between.

Another commenter suggested a build use: if a build runs in wasm, you can take away its random number generator or its network and check that it still works, which could push reproducible builds further than the Nix sandbox does today. That is a commenter's idea, not a feature the project ships.

Do not treat it as a security sandbox by default. A skeptical reply in the same thread argued that WebAssembly is "not the solution to sandboxing," because the browser engines are C and C++ code that attackers target, and a C kernel compiled to wasm brings C-style bugs with it. The reply cites a USENIX Security 2020 paper, Everything Old is New Again: Binary Security of WebAssembly, which studies how memory bugs in C code still matter after compiling to wasm. If you plan to run untrusted code in unkernel, do your own threat model first.

Known limits, from the README:

  • The SDK and CLI boot one CPU by default. The page boots several where the browser allows it.
  • No hardware breakpoints or watchpoints, so gdb watchpoints single-step the program.
  • Code that runs only a few times, such as npm's startup, stays on the interpreter. Floating point and SIMD math also go through the interpreter.
  • A wasm trap in the kernel ends the session.

A note on licensing if you plan to embed it

The JavaScript SDK and page code are MIT. The npm package also ships a Linux kernel and busybox, which are GPL-2.0, so the package license is MIT AND GPL-2.0-only. Read the project's THIRD-PARTY.md before you bundle it in a product.

Where this leaves us

Bernhardt's talk put browsers inside browsers in a fictional 2035. In November 2026, unkernel and trynix made a version of it work. The design choice behind the speed is simple: compile the kernel, emulate only the programs. The costs are in the project's own notes: CPU-heavy work is well behind native, browser support depends on JSPI, and networking needs a relay.

If you could give someone a link that boots a real Linux shell with your tool installed, what would you put in it?