PiThings has published unkernel on GitHub, a real Linux kernel compiled to WebAssembly that boots to a shell in under a second. It’s Linux 7.x built as a single wasm module with a real MMU. The syscalls, scheduler, memory management, ext4 and TCP/IP are compiled code rather than emulation, so programs see Linux’s own behavior.
Only user programs are emulated, by kwemu, a riscv64 CPU written in Zig and linked into the kernel. Unmodified Alpine and Ubuntu binaries run as they are. When a program makes a syscall, kwemu returns to the kernel, which handles it as native wasm. Task switches use JSPI so the kernel has real stacks it can suspend and resume. Hot user code goes to a JIT that compiles riscv64 to wasm modules at run time, reaching about 3900 MIPS on a tight integer loop against about 270 interpreted.
Opening the page downloads about 10 MB and brings up a shell with a package manager, a persistent disk saved in the browser, internet access through a Wisp proxy, and a screen with sound.…