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.
erikkaumop2 days ago
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!
Mockapapella2 days ago
Looks really cool! Might try this out with some projects