r/WebAssemblyDev • • 10h ago

I put Linux in WebAssembly, then made it serve Linux in WebAssembly. It works. Please don't do this.

16 Upvotes

TL;DR: NixOS runs as a single WebAssembly module, with no JavaScript, no VM and no container. That NixOS runs a web server. That web server serves a page that boots… NixOS in your browser tab. In WebAssembly. From the server's own disk. Turtles all the way down. Done without a sweat using claude.

How it started: "can this Linux-on-wasm thing (unkernel, by pithings, who did the actually hard part) run outside a browser?"

How it's going:

  • NixOS in a browser tab, with a terminal, network, and nix pulling from cache.nixos.org. Your changes survive a reload.

  • NixOS in your terminal, as a WASI module: wasmer run westixy/nixonwasm --llvm --net -- --cpus 4. Real systemd, 4 CPUs, a shell.

  • Nested: on Wasmer Edge, a NixOS-in-wasm serves the page, and as the tab's disk image it serves its own block device, the very bytes it booted from. Your tab then boots the same system as the server. Server and client are the same OS, both in wasm, one serving the other its own disk.

Crimes committed along the way:

  • Replaced JSPI with Binaryen's Asyncify so the kernel can switch tasks without a JS engine.

  • Squeezed the Rust host above the kernel's RAM in the same linear memory, by patching the one memory.size the kernel reads.

  • Ran an SMP Linux on wasi-threads: one module instance per CPU, each CPU juggling its own saved stacks.

  • Wrote a tiny TCP/IP gateway (smoltcp) on WASIX sockets, plus port forwarding, so Edge can talk to the guest.

  • Hit a kernel BUG! because every new thread re-zeroed the live kernel's memory. Classic.

  • Learned the guest's network card skips checksums, so every TCP packet was silently binned.

  • Got "Application ran out of memory" from Edge, and gave the server 320 MB of RAM. It still serves Linux.

  • Discovered wasmer's default compiler is ~20× slower than LLVM on a whole interpreted kernel.

Does it work? Yes, which is the funny part. Is it fast? Locally it's fine: NixOS boots in ~8 s and the tab boots in ~25 s. Through the nested Edge demo it's… a journey. Bring snacks.

Nested demo (please don't reproduce this in production. Or anywhere): https://nixontab-nested.wasmer.app

Warning: this is a for-fun experiment: not a product, not maintained, not for production, and definitely not like this. It exists because it was fun to see if it could.

Code: https://github.com/Westixy/nixontab


r/WebAssemblyDev • • Sep 17 '25

Wasm 3.0 Completed

Thumbnail
webassembly.org
14 Upvotes

r/WebAssemblyDev • • Jan 18 '24

Super Mario 64 ported to WebAssembly

Thumbnail probablykam.github.io
12 Upvotes

r/WebAssemblyDev • • Dec 18 '23

Wasm3 maintainer's house destroyed - Contributions are now more valuable than ever

Thumbnail
twitter.com
12 Upvotes

r/WebAssemblyDev • • Aug 29 '24

The WebAssembly memory control proposal

Thumbnail
github.com
11 Upvotes

r/WebAssemblyDev • • Aug 28 '24

Cage: Hardware-Accelerated Safe WebAssembly

Thumbnail arxiv.org
11 Upvotes

r/WebAssemblyDev • • Aug 14 '24

Diablo is now running in the browser, thanks to WebAssembly

Thumbnail d07riv.github.io
11 Upvotes

r/WebAssemblyDev • • 10d ago

Unikernel: A real Linux kernel, compiled to WebAssembly. It boots to a shell in less than a second.

Thumbnail
github.com
10 Upvotes

r/WebAssemblyDev • • Oct 28 '25

Development of a WebAssembly backend for GCC is underway.

Thumbnail
github.com
10 Upvotes

r/WebAssemblyDev • • Jul 31 '25

Local WASM-Powered Office Editing/Preview (Demo Inside)

10 Upvotes

Built a browser-based Office solution using:
🔹 Qihoo360/se-office (Chinese docs only)
🔹 cryptpad/onlyoffice-x2t-wasm

Works offline without server dependencies. Ideal when:
❌ Cloud-based preview is prohibited (security/compliance)
💻 Local processing is required

Try demo: https://ranuts.github.io/document/
Full code: https://github.com/ranuts/document

(Note: WASM bundle size ~40MB, initial load takes time)


r/WebAssemblyDev • • Mar 10 '25

Fully In-Browser Graph RAG with Kuzu-Wasm

Thumbnail
blog.kuzudb.com
10 Upvotes

r/WebAssemblyDev • • Jul 30 '24

Porffor: a JS engine/compiler/runtime, compiling JS code to WebAssembly or native ahead-of-time.

Thumbnail porffor.dev
10 Upvotes

r/WebAssemblyDev • • Jun 15 '24

GStreamer ported to WebAssembly

Thumbnail
github.com
10 Upvotes

r/WebAssemblyDev • • Mar 12 '26

WebAssembly Games with C# & AssemblyScript - all in your browser.

Post image
9 Upvotes

r/WebAssemblyDev • • Sep 10 '25

Firefox has replaced WebAssembly with C++ for its inference engine, making it run 10x faster

Thumbnail
omgubuntu.co.uk
9 Upvotes

r/WebAssemblyDev • • Feb 19 '25

Wazero 1.9.0 is released

Thumbnail wazero.io
9 Upvotes

r/WebAssemblyDev • • Sep 29 '25

A WebAssembly compiler that fits in a tweet

Thumbnail
wasmgroundup.com
8 Upvotes

r/WebAssemblyDev • • Jun 12 '25

Doom-Captcha: A captcha that requires killing 3 monsters, powered by WebAssembly

Thumbnail
doom-captcha.vercel.app
8 Upvotes

r/WebAssemblyDev • • Feb 11 '25

"We Replaced Our React Frontend with Go and WebAssembly"

Thumbnail
dagger.io
8 Upvotes

r/WebAssemblyDev • • Jan 19 '25

Wasm GC isn’t ready for realtime graphics

Thumbnail dthompson.us
8 Upvotes

r/WebAssemblyDev • • Nov 15 '24

Visual Basic 6 IDE and language re-created using Avalonia, running on WebAssembly

Thumbnail bandysc.github.io
8 Upvotes

r/WebAssemblyDev • • Jul 30 '24

Orca: WebAssembly apps without the web.

Thumbnail
orca-app.dev
8 Upvotes

r/WebAssemblyDev • • Jul 06 '24

Introducing the WebAssembly JavaScript Promise Integration API

Thumbnail v8.dev
8 Upvotes

r/WebAssemblyDev • • Nov 21 '25

A book on WebAssembly: WebAssembly from the ground up

Thumbnail
wasmgroundup.com
7 Upvotes