HackerTrans
TopNewTrendsCommentsPastAskShowJobs

benno128

no profile record

Submissions

Git-reabsorb: Reorganize Git commits with new structure using an LLM

github.com
6 points·by benno128·8 เดือนที่ผ่านมา·2 comments

MCP Servers are surprisingly easy. I made one that runs code in a sandbox

runno.dev
1 points·by benno128·12 เดือนที่ผ่านมา·1 comments

Runno/Sandbox: A WebAssembly Sandbox for Running Code in Node (etc)

runno.dev
4 points·by benno128·ปีที่แล้ว·0 comments

Show HN: MCP Server for secure code execution (Python, Ruby, C, and more)

github.com
7 points·by benno128·ปีที่แล้ว·0 comments

Runno: The Web Component for Code

runno.dev
2 points·by benno128·ปีที่แล้ว·0 comments

Show HN: I made a Python package for sandboxing code

runno.dev
2 points·by benno128·ปีที่แล้ว·0 comments

Crashing your production app with iteration

shiplog.nspain.dev
1 points·by benno128·2 ปีที่แล้ว·0 comments

comments

benno128
·ปีที่แล้ว·discuss
Yeah for sure: run it inside a virtual machine, or do some sort of docker magic.

You kind of need to pretend you are a whole computer for a programming language to be happy. There's built in assumptions they're running on a "real" computer. They assume they've got full access to network and disk. Installing packages often requires compiling C extensions, or running native binaries. All that stuff means the best way to sandbox is to virtualise a whole computer.

It's fun to do it with WebAssembly though, you get a lot of guarantees and it's quite light weight.
benno128
·ปีที่แล้ว·discuss
I've got one that uses WebAssembly to run Python, Ruby, C/C++, JS: https://runno.dev/articles/sandbox/
benno128
·ปีที่แล้ว·discuss
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/
benno128
·ปีที่แล้ว·discuss
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.
benno128
·ปีที่แล้ว·discuss
Sounds really interesting. Where can I try it out? I struggled to find a link in the article.
benno128
·3 ปีที่แล้ว·discuss
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).
benno128
·3 ปีที่แล้ว·discuss
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.
benno128
·3 ปีที่แล้ว·discuss
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).