正在加载视频...
视频加载失败
weekend quest: A real Linux kernel, compiled to WebAssembly. Programs run on a fast RISC-V CPU with a wasm JIT. It works on Node.js, Browsers, and even iOS.
69,114 次观看 • 1 天前 •via X (Twitter)
27 条评论

Run any Linux program on your device: bash, node, ubuntu, python, databases, even Doom. Right in your browser tab. The kernel boots in milliseconds. [demo in realtime]

The kernel itself runs as native wasm. Only the programs are emulated, on kwemu: a riscv64 CPU written in Zig, with a wasm JIT. A syscall is a plain wasm call. Devices are paravirtual, backed by the JS SDK.

And you can use the JS SDK to embed unkernel in any Node.js or Web app:

Try online: Source:

the syscall being a plain wasm call is the detail that matters. every emulator before this had to trap and marshal across a boundary, and that trap is where they all got slow and miserable. also means the filesystem is a js object you can shim in tests

Amazing. Definitely going to see how I can push this.

you should ditch the RISCV64, check out ARM64v8 emulator in Zig (validated against real HW like ampere and mac)

カーネルをWasm化してブラウザやiOSまで動かせるのは、OS依存の実験環境を配りやすくするのが面白いですね。RISC-V上のJITまで含めて、移植先ごとの差をどこで吸収しているのか気になります。

insane 🚀

Very cool !

how practical is running a full WASI runtime inside the Linux guest given kwemu + JSPI and are there hard blockers on that ?

Nice! Great work!!

does guest RAM top out at wasm32's 4GB linear memory, or is unkernel on memory64 already

Awesome!

linux in wasm running on ios is a sentence that shouldn't work

That has got to be one of the coolest projects 🤯

unkernel in a browser tab! tried to dm you about a sandbox builder running untrusted code i can intro you to but it didn't go through

@jexia_ This is awesome! We had the same weekend quest 😯

great song

Excited at first, but is it normal of a pure CPU task to be around 19x slower than native run? Running on arm64 Android natively. npx unkernel --mem 1024

I’d love to run <ununkernel> inside a browser inside it.

Can't wait to experiment on this 🤩

the part agents people should clock: the sandbox boundary is an import list. everything the code inside can touch is a wasm import you chose to expose, so the capability surface is enumerable. a container gives you a wall with a whole kernel behind it.

👀

Hey Pro! Let's connect, followed

I also built this this weekend. Promising!

Multithreaded with sharedarraybuffer?
