Unkernel: Linux kernel in WASM

(unkernel.dev)

16 points | by dvrp 9 hours ago ago

8 comments

  • RRRA 7 hours ago ago

    So... What are the network constraints when running this in a browser?

  • russfink 7 hours ago ago

    What was the motivation behind this? Do you have a use case or did you do it just because? No judgment - truly impressive!

    • em3rgent0rdr 7 hours ago ago

      looking at https://github.com/pithings/unkernel

      > Open a page and you have a Linux machine with a shell, a package manager, a persistent disk, internet access, and a screen with sound. It runs entirely on your device, with nothing to install and no server...

      > Much of what makes a system feel slow lives in the kernel: starting processes, syscalls, page faults, file and network I/O. In unkernel that path runs at wasm speed. > Boot: the kernel reaches /init about 70 ms after it starts, and the Alpine prompt appears 0.3 s after node launches. The page downloads about 10 MB, and Alpine boots in 48 MiB of guest memory. > Syscalls at close to native cost: getppid takes about 170 ns (110 native, 1.7 µs under qemu-system), a 64-byte read about 170 ns (160 native). > fork at native speed: fork + exit + wait takes about 60 µs, against about 70 µs natively and 1.2 ms under qemu-system.

  • rvz 7 hours ago ago

    This is completely misleading and it isn't the Linux kernel in "WASM".

    It is just a vibe-coded RISC-V emulator in WASM that emulates Linux on RISC-V using a JIT.

    Note the kernel version: "Linux unkernel 7.3.4+ #3 Mon Nov 16 11:55:34 UTC 2026 riscv64 Linux"

    Do we not actually look underneath at how things work or do we just read whatever is in the title and take it at face value?

    • em3rgent0rdr 7 hours ago ago

      My understanding is this Linux kernel is compiled as a wasm64 module, while the user space is riscv64 Linux ELFs, running on a emulated software CPU.

    • tosti 6 hours ago ago

      Remember when the cool new stuff was actually cool? Nowadays it's all vibe-coded slop. IMHO the depressing thing is if people get used to this and actual programming craftmanship isn't recognized as such anymore. In fact I believe maintainers have already mistaken me for an AI. Patched accepted without any feedback whatsoever, no thank you, nothing. But that's okay, I should just submit more fixes and it'll be fine.

  • aliazzolini 8 hours ago ago

    Can I install kernel modules?

  • Sid_Lmao 8 hours ago ago

    [dead]