Webassembly (wasm) Arch Support for the Linux Kernel
Key topics
The Linux kernel has been modified to run as a WebAssembly (WASM) module, allowing Linux to run in a browser or other WASM runtime, with commenters discussing the project's potential, limitations, and comparisons to similar projects.
Snapshot generated from the HN discussion
Discussion Activity
Very active discussionFirst comment
2h
Peak period
29
48-60h
Avg / period
12.8
Based on 64 loaded comments
Key moments
- 01Story posted
Nov 1, 2025 at 12:39 PM EDT
2 months ago
Step 01 - 02First comment
Nov 1, 2025 at 3:00 PM EDT
2h after posting
Step 02 - 03Peak activity
29 comments in 48-60h
Hottest window of the conversation
Step 03 - 04Latest activity
Nov 6, 2025 at 10:54 AM EST
about 2 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
container2wasm/container2wasm: https://github.com/container2wasm/container2wasm :
> container2wasm is a container-to-wasm image converter that enables to run the container on WASM.
> Converts a container to WASM with emulation by Bochs (for x86_64 containers), TinyEMU (for riscv64 containers) and QEMU.
> Runs on WASI runtimes (e.g. wasmtime, wamr, wasmer, wasmedge, wazero)
> Runs on browser
> x86_64, riscv64 or AArch64 containers are recommended.
/? container2wasm: https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...
ktock/vscode-container-wasm https://github.com/ktock/vscode-container-wasm :
> Containers on VSCode for the Web [ https://vscode.dev ]
ktock/vscode-container-wasm-gcc-example: https://github.com/ktock/vscode-container-wasm-gcc-example
JupyterLite works without install on Chromebooks.
JupyterLite still lacks a Terminal e.g. with BusyBox Ash in WASM, with a file system integrated with the Jupyter-xeus kernel file system.
This appears to load much more quickly than other Linux and I think even just bash in WASM demos I've seen.
Removing the ISA translation layer has the potential to be massively faster for full-system environments. At the expense of maybe some new bugs.
The performance should ultimately be similar to compiling your userspace application directly as Wasm, but you now get to take advantage of the full kernel ABI instead of just the minimal shims that Emscripten give you / whatever DOM glue you create yourself.
Shouldn't browser tabs and/or origins get their own SELinux contexts like all Android apps since Android 4.4, like container-selinux and openshift's k8s? https://news.ycombinator.com/item?id=45418918#45421242
uutils/coreutils, findutils, diffutils, and Toybox are written in Rust which IIRC has a cleaner compile to WASM: https://news.ycombinator.com/item?id=45495100
RustPython may for may not also have a faster loading time than CPython compiled to WASM, though there are already some patches to CPython for WASM.
Where are the tests for the post-patch bugs this finds? Are they're expected behaviors that are not yet in tests which specify?
> I recommend Chromium-based browsers over Firefox, as the latter does not work very well when debugging Wasm projects of this size.
Using Wasm as an end-all system was never the main intention even if we're heading that way now thanks to all the work people has put in.
I'd say that it's probably used where it's made sense so far.
- Testing a distro or specific software without downloading it
- Educational use (teaching Linux basics on Chromebooks etc)
- Bypassing restrictions on installing certain software
I think this is really cool but I was struggling to think of a way it could be useful. Your last two suggestions seem especially pertinent.
Soon enough, WASM may just well be the #1 platform upon which to run a Linux on a Desktop ..
In the end, it's kinda cool.
I ran a small performance test with 'bc -lq' and compared with [0]:
This WASM architecture compilation completely blows away my old emulation setup, which only managed around 200 MIPS. Maybe this approach can be generalized. Running a full Linux distribution at near-native speed right in the browser would be awesome.[0] https://github.com/s-macke/jor1k
I generally preferred copy.sh more to be really honest. I have actually used it sometimes as a poor man's qemu. If I may ask, what are your thoughts on copy.sh as I found that its performance on busybox or (tinycore linux with gui) was so brilliant (the only downside was that the internet speed was abysmally slow, like for me really really slow.)
My own OpenRISC CPU emulation fits into just 1,500 lines of code, and I optimized every single line. To make it work, I had to compile my own Linux distribution completely from scratch. I stopped working on it about eight years ago, but I’ve completed a dozen other successful projects since then.
I’m still very proud that nearly every browser-based Linux emulator, including JSLinux and copy.sh, uses my 9p-virtio- filesystem approach. It makes running complex Linux distributions in the browser much simpler.
Overall, my thoughts about copy.sh’s work are entirely positive.
The segfault is unfortunate though
https://github.com/joelseverin/linux-wasm/blob/master/patche...
[0] https://github.com/s-macke/jor1k
and it's gone
By the way I have developed a similar project, WebCM, a RISC-V emulator capable of running full Alpine Linux that can be embedded in the Web browser and can reach up to 500 MIPS for some users, which I think is pretty fast despite the emulation, you can try at https://edubart.github.io/webcm/. Booting is also fast, it always boots from scratch when you open the page, so you can boot fast even with emulation.
I'm incredibly curious what this bug might be!
Spooked me for a sec xD
[Runner sh (18815616)]: Wasm crash: RuntimeError: abort
Illegal instruction
"One important difference is that there is no way to suspend execution of a task. There is a way around this though: Linux supports up to 8k CPUs (or possibly more...). We can just spin up a new CPU dedicated to each user task (process/thread) and never preempt it. Each task is backed by a Web Worker, which is in practice backed by a thread in the host OS (through the WebAssembly implementation). "
Also tangentially related: I'd love to see a performant build of Node.js compatible with this runtime (or really any flavor of WASM), but I think you'd run into the same issues that I have with WASIX. Namely build headaches, JIT, and wasm(-in-wasm) support. I'd explore it myself but I've already sunk way more time than is reasonable on that endeavor.
It seems like OP put together their own musl-based libc which is awesome, but being able to compile against WASI would open up a lot of possibilities.
This also reminds me of the recent thread on user-mode linux -- how easy it would be to compile to WASM was definitely on my mind.
(https://www.destroyallsoftware.com/talks/the-birth-and-death...)
https://en.wikipedia.org/wiki/Lisp_machine
Some ways I can see it could improve:
In general, I recommend taking an inspiration from WASIX [1] for those things, as we have spend quite a bit of time to make things work as much as possible![1] https://wasix.org/
If anyone's curious to see what's packed in here at a glance: https://modsurfer.dylibso.com/module?hash=3fa6b28252b0d72c82...
The Wasm port of the Linux kernel sounds quite interesting as it may potentially help improving the syscall compatibility of elfconv.
I am not a person involved in building anything like this but I am a person who frequently used copy.sh/v86 and was actually building a tinycore fork which added jujutsu so that people can run jujutsu to try it out in their browser. It was a project which made me understand so much more about building linux from scratch, what isos are, and everything.
One surprising thing was that I was able to make the iso actually have jujutsu and it could run on something like qemu but not on tinycore due to some minor issue
Basically I believe that some really interesting quick-tries of some software can happen if we can have customized linux with our apps directly in the browser
This is such an interesting project really and it feels very snappy to me.
I have a quick suggestion as someone trying to make a custom iso linux / binary apps just work on linux in browser: Can you please, please, create a docker image where you can give static applications as an input in the docker and it would automatically generate the html page with wasm or the wasm output containing that static application in the /usr/bin
You mention something like this this
docker run -it -name full-linux-wasm linux-wasm-contained:dev /linux-wasm/linux-wasm.sh all
I haven't read the project more but I do find it incredibly minimalist and I genuinely hope you can add the ability to add static/hopefully some day glibc as well but I am mentioning it because there are a lot of golang tools which are statically linked and it would be so interesting to running them in browser if possible via their binaries
Yes I know that they could probably run via compiling into wasm itself but that just felt so much messy to me on how I could provide other tools like busybox with it or how it would actually feel like a linux environment to test it out as an example
I have to admit, your project is really really cool. Good luck on this project! Starred, and have a nice day.
1 more comments available on Hacker News