Show HN: WASM runtime for sandboxing Python code

2 days ago (github.com)

A while ago I started experimenting with compiling the Python interpreter to WASM. To build a secure, fast, and lightweight sandbox for code execution — ideal for running LLM-generated Python code.

The idea came when tinkering with WASM+WASI and realizing that you can compile the Python interpreter to wasm32-unknown-wasi, and run it in a WASM sandbox. It's an experimental Rust server that executes Python code. I've always been amazed by the Cloudflare Workers runtime, which builds on the V8 engine. You can think of this as an aspiration to build something:

- with similar startup times (and maybe similar memory footprint) - that's not only for JavaScript - open-source for you to run locally and tinker with

Happy hacking!