Hacker News new | past | comments | ask | show | jobs | submit | benno128's comments login

Working on Runno (https://runno.dev/) as a side project. It's a tool for running code in the browser for educational use.

[Edit]: I wrote a re-introduction to Runno: The WebComponent for Code over the weekend (https://runno.dev/articles/web-component/)

I've been playing around with turning it into a sandbox for running code in Python (https://runno.dev/articles/sandbox-python/). This would allow you to safely execute AI generated code.

Generally thinking about more ways to run code in sandbox environments, as I think this will become more important as we are generating a lot of "untrusted" code using Gen AI.


Awesome! Have you considered pyodide[1]? Pydantic uses this for sandboxing its AI agents [2].

1. https://pyodide.org/en/stable/ 2. https://ai.pydantic.dev/mcp/run-python/


Thanks! Yeah I'm very aware of Pyodide and interested in adopting some of their techniques.

A big difference between my approach and their approach is that Runno is generic across programming languages. Pyodide only works for Python (and can only work for Python).

Big interesting development in this space is the announcement of Endor at WASM IO which I'd like to try out: https://endor.dev/


Amazing!


Sounds really interesting. Where can I try it out? I struggled to find a link in the article.


Yes! https://Endor.dev

Let us know what you think if you get a chance :)


Really impressed by the depth and breadth of this project, well done!

A particularly interesting part is the socket layer inside the browser. Other people solving this problem have previously used a proxy to a server that does the real socket implementation. This means you can't have a "browser-only" solution.

The author has solved this (for HTTP/S only) by proxying HTTP requests and then re-creating them as fetch requests (details here: https://github.com/ktock/container2wasm/tree/main/examples/n...). I'm very interested in using this approach for my own project Runno (https://runno.dev).


That does have some major caveats of course: some headers will be totally ignored by the browser due to web restrictions, some will be added/overridden (e.g. user agent), and CORS will apply (which will seriously surprise most Linux tools!).

Still, very neat, agreed. Almost certainly the best you can do without having some kind of backend proxy running on either the server or the user's own machine.


This is the use case I've been tackling with Runno (https://runno.dev), it's more performant than OP's approach but not as flexible.


There is support in Docker to run wasm-wasi binaries directly (see: https://wasmlabs.dev/articles/docker-without-containers/). The downside compared to OP's approach is that whatever you're running has to have already been compiled to wasm-wasi. The upside would be much faster execution time (no emulation overhead for x86).


I'm working on this problem as well and would be happy to sling you some thoughts and notes. Check my website https://runno.dev and send an email to the address on that website!


Yeah of course! They've got STDIN/STDOUT/STDERR and I've built a Virtual Filesystem. But if you're using WASI binaries locally they don't have that restriction.

You might be interested in WAGI: https://github.com/deislabs/wagi

And to catch up on WASI: https://xeiaso.net/talks/unix-philosophy-logical-extreme-was...


Thanks for the feedback! It’s also cost me about $15 so far. I don’t think I’ll do that again, but it was fun as a demo!


Looking forward to it!


Sorry! It is running ffmpeg in your browser on page load, which might not make it happy.


Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: