That is what unkernel does, an open-source project by Pooya Parsa (pi0). Open the page, load about 10 MB, and a small desktop with an Alpine terminal is ready.
The architecture
unkernel does not emulate a PC. The Linux kernel (7.x) was compiled straight to WebAssembly, with its own architecture port. The scheduler, memory management, ext4 and TCP/IP are real kernel code.
Only user space is emulated: an ARM64 emulator written in Zig, with a JIT that compiles frequently run code to WebAssembly at run time. That is why unmodified Alpine and Debian packages run, including apk and apt.
The speed
What makes it possible is JSPI, a new browser feature that lets the kernel suspend and resume tasks. apk add python3 takes about 3.4 seconds. CPU-heavy programs still run well behind native speed.
The rest
Changes go to an ext4 disk in browser storage and survive a reload. Networking runs through a proxy, and USB, Bluetooth and serial devices are passed through to the browser. With npm install unkernel you can embed all of it in your own apps.
Verdict
It is early (0.x), has no IPv6 and uses one CPU by default. For demos, tutorials and playgrounds it is useful today: one link, and the reader has a Linux machine in front of them.
Requirements: Chrome/Edge 137+, Firefox 153+, Safari 27+ or Node 24+. The code is on GitHub.