Hacker News

JSLinux Now Supports x86_64

120 points by TechTechTech ago | 27 comments

simonw |next [-]

The thing I most want to use this (or some other WASM Linux engine) for is running a coding agent against a virtual operating system directly in my browser.

Claude Code / Codex CLI / etc are all great because they know how to drive Bash and other Linux tools.

The browser is probably the best sandbox we have. Being able to run an agent loop against a WebAssembly Linux would be a very cool trick.

I had a play with v86 a few months ago but didn't quite get to the point where I hooked up the agent to it - here's my WIP: https://tools.simonwillison.net/v86 - it has a text input you can use to send commands to the Linux machine, which is pretty much what you'd need to wire in an agent too.

In that demo try running "cat test.lua" and then "lua test.lua".

the_mitsuhiko |root |parent |next [-]

> The thing I most want to use this (or some other WASM Linux engine) for is running a coding agent against a virtual operating system directly in my browser.

That exists: https://github.com/container2wasm/container2wasm

Unfortunately I found the performance to be enough of an issue that I did not look much further into it.

jraph |root |parent |next |previous [-]

Simon, this HN post didn't need to be about Gen AI.

This thing is really inescapable those days.

simonw |root |parent [-]

Parallel thread: https://news.ycombinator.com/item?id=47311484#47312829 - "I've always been fascinated by this, but I have never known what it would be useful for."

I should have replied there instead, my mistake.

apignotti |root |parent |previous [-]

We are working on exactly this: https://browserpod.io

For a full-stack demo see: https://vitedemo.browserpod.io/

To get an idea of our previous work: https://webvm.io

blackhaz |next |previous [-]

Sorry for the off-topic, but what a bliss to see Windows 2000 interface. And what an absolute abomination from hell pretty much all the modern UIs are.

shevy-java |root |parent |next [-]

Yeah. Microsoft really went downhill UI-wise.

cheema33 |root |parent |previous [-]

Is that even remotely relevant to JSLinux?

nout |root |parent [-]

Yes, it's one of the available emulated systems on JSLinux.

maxloh |next |previous [-]

Unfortunately, he didn't attach the source code for the 64-bit x86 emulation layer, or the config used to compile the hosted image.

For a more open-source version, check out container2wasm (which supports x86_64, riscv64, and AArch64 architectures): https://github.com/container2wasm/container2wasm

zamadatix |root |parent [-]

https://github.com/copy/v86 might be a more 1:1 fully open sourced alternative.

maxloh |root |parent [-]

Not really. x86_64 is not supported yet: https://github.com/copy/v86/issues/133

wolttam |next |previous [-]

I can launch this thing and start making arbitrary connections out to port 25 on the internet from some random IP? Hmm.

maxloh |root |parent |next [-]

From the "Technical notes" page:

> Access to Internet is possible inside the emulator. It uses the websocket VPN offered by Benjamin Burns (see his blog). The bandwidth is capped to 40 kB/s and at most two connections are allowed per public IP address. Please don't abuse the service.

https://bellard.org/jslinux/tech.html

AlecMurphy |next |previous [-]

If anyone is interested, I made some modifications last month to get TempleOS running on the x86_64 JSLinux: https://ring0.holyc.xyz/

notorandit |next |previous [-]

Incredible guy!

shevy-java |next |previous [-]

He builds epicness.

petcat |next |previous [-]

I've always been fascinated by this, but I have never known what it would be useful for. Does anyone know of any practical use cases?

toast0 |root |parent |next [-]

I use a similar emulator (v86) as a way to share my hobby OS. Approximately zero people, even my friends, are going to boot my hobby OS on real hardware; I did manage to convince some of them to run it in qemu, but it's difficult. A browser environment shows the thing quite well; and easy networking is cool too.

My hobby OS itself is not very useful, but it's fun if you're in the right mood.

omoikane |root |parent |next |previous [-]

I use bellard.org/jslinux to test compilation of strange code sometimes[1], since it came with compilers that are different versions from what I have installed locally, and it's easier to open up a browser than starting a VM.

[1] For example:

https://www.ioccc.org/2020/yang/index.html#:~:text=tcc%200.9...

https://www.ioccc.org/2018/yang/index.html#:~:text=tcc%200.9...

redleader55 |root |parent |next |previous [-]

Agentic workloads create and then run code. You don't want to just run that code in a "normal" environment like a container, or even a very well protected VM. There are other options, ofc - eg. gvisor, crossvm, firecracker, etc, but this one is uncommon enough to have a small number of attackers trying to hack it.

srdjanr |root |parent [-]

What's wrong with a well protected VM? Especially compared to something where the security selling point is "no one uses it" (according to your argument; I don't know how secure this actually is)

s-macke |root |parent |next |previous [-]

Most such emulators have Internet access on the IP level. Therefore, this is a very cheap way to test anything on the Internet.

    apk add nmap
    nmap your.domain.com
However, the speed is heavily throttled. You can even use ssh and login to your own server.

It can also be used as a very cheap way to provide a complete build environment on a single website, for example to teach C/C++. Or to learn the shell. You don't have to install anything.

varun_ch |root |parent |next |previous [-]

Maybe if you’ve got some ancient software that’s missing source code and only runs with X Y and Z conditions, you could continue to offer it on the web and build around it like that? Not sure if that would be practical at all, but could be interesting

maxloh |root |parent |previous [-]

My college professor used it to teach us the Linux command line

We have Windows PCs in the classroom.

westurner |next |previous [-]

UBY: touchscreen: How to scroll the scrollback

westurner |previous [-]

How do TinyEmu and JSLinux compare to linux-wasm?

From "Show HN: Amla Sandbox – WASM bash shell sandbox for AI agents" (2026) https://news.ycombinator.com/item?id=46825119 :

>>> How to run vscode-container-wasm-gcc-example with c2w, with joelseverin/linux-wasm?

>> linux-wasm is apparently faster than c2w

From "Ghostty compiled to WASM with xterm.js API compatibility" https://news.ycombinator.com/item?id=46118267 :

> From joelseverin/linux-wasm: https://github.com/joelseverin/linux-wasm :

>> Hint: Wasm lacks an MMU, meaning that Linux needs to be built in a NOMMU configuration

From https://news.ycombinator.com/item?id=46229385 :

>> There's a pypi:SystemdUnitParser.