pithings/unkernel
Developer ToolsBoots a real Linux kernel compiled to WebAssembly, giving a fast Alpine shell in the browser or via Node.
What it is
unkernel compiles a real Linux kernel into a single WebAssembly module and boots it to an Alpine Linux shell in under a second. The kernel itself — syscalls, scheduler, memory management, ext4, TCP/IP — is native wasm code, not emulated; only user programs run through an emulator (kwemu, a riscv64 CPU written in Zig) with a JIT, so unmodified riscv64 binaries from Alpine, Debian or Ubuntu work as they are. It targets developers who want a portable Linux environment in the browser or Node, or who want to embed Linux in an application.
Try it in the browser
Open unkernel.dev. A roughly 10 MB download produces a shell with a package manager, persistent disk, networking and display/audio support; changes survive a reload. Multi-terminal windows and recovery via safe mode are available. The page accepts URL parameters such as ?mem=512, ?net=0, ?data=0 and ?wisp=wss://... to adjust memory, networking, persistence or the Wisp proxy. Since browsers cannot open raw TCP sockets, internet access goes through a Wisp proxy; hosting elsewhere requires pointing ?wisp= at your own Wisp proxy. Chrome/Edge 137+, Firefox 153+ and Safari 27+ are listed as working, and the page reports missing features (such as JSPI) on older browsers.
Run it from the terminal
The quickest path requires Node.js and no project setup:
npx unkernel
This boots Alpine from RAM with networking over host sockets; press Ctrl-] to quit. Useful options include --disk alpine.ext4 for a persistent ext4 root, --mount .:/work to expose a host directory in the guest, --forward 8000:80 to reach a guest server, and --timeout/--input for scripted runs whose outcome is reported in the exit code. The CLI is documented in the terminal section.
Use it from JavaScript
Install the npm package and create a kernel:
npm install unkernel
import { createKernel } from "unkernel";
const vm = await createKernel();
vm.onOutput((bytes) => process.stdout.write(bytes));
vm.write("uname -a; poweroff\n");
const { code, kind } = await vm.exited;
The same import works in Node and browsers; unkernel/node and unkernel/web select an entry explicitly. Beyond the basic console, the SDK supports exec() and pty-backed spawn() for program execution, host mounts over 9p/vsock, vsock byte streams, TCP to the guest loopback via vm.connect() and vm.fetch(), shared memory, a framebuffer/evdev/ALSA interface, and optional networking through directBackend() or wispBackend(). The SDK section covers each API.
Constraints and known limits
The kernel runs one CPU with no SMP, no IPv6, no UDP beyond DHCP/DNS and no inbound connections. ptrace register sets and seccomp are absent, so strace and gdb do not work, and a kernel wasm trap ends the session. The JIT covers hot integer code while atomics and system instructions fall back to the interpreter. On the SDK side, the guest is driven through terminals/console or your own vsock programs, stop() is not a clean shutdown (poweroff is preferred), only one kernel runs per thread, and Node-only TypeScript projects using the types need DOM lib types or skipLibCheck.
Build from source
Building requires Linux x86-64 or arm64, Zig 0.16, Node 24, clang 21+ with the wasm target and common build tools; ./setup.sh --check reports missing pieces. The first build takes about 12 minutes and 5 GiB of disk. Run ./setup.sh to check and build, node js/cli.ts to boot your build, and pnpm install && pnpm dev to serve the web page locally. The kernel and patches are GPL-2.0-or-later, while the JavaScript SDK and page are MIT, so the npm package is MIT AND GPL-2.0-only.
HotRepo's take
unkernel was created on 2026-11-12 and, by the 2026-11-16 TypeScript new-project snapshot, reached 111 stars with 10 gained over the recorded one-hour window; it has no recorded GitHub daily rank yet. That is a short observation window, so the record shows early interest rather than a trend. What distinguishes the project is its stated architecture: running Linux natively in wasm while emulating only riscv64 user space behind real Sv39 page tables, with a two-tier interpreter/JIT and paravirtual devices. The README's own benchmarks put syscalls close to native and pure computation well behind it, which matches that design and is the number set to weigh if you plan on CPU-heavy guest workloads.
Written by AI from the project's README, updated . The project's own docs are the source of truth.