I build a lightweight vm here that fits your needs as well: https://github.com/smol-machines/smolvm
Running Python code in a sandbox with MicroPython and WASM
31–40 of 46 posts
Re: Running Python code in a sandbox with MicroPython and WASM
#32On linux I devised this strategy for letting llm webuis or coding agent to securely run programs by burying their environment under multiple layers of locally arranged sandboxing. Basically: run as another user -> run inside firejail sandbox -> run inside a stripped down alpine linux vm with smolvm. See the whole procedure here: https://www.reddit.com/r/LocalLLaMA/comments/1tm93ng/how_i_d... P.S. directories can be e…
Re: Running Python code in a sandbox with MicroPython and WASM
#33We are working to solve the "sandoxing in Wasm" problem across multiple runtimes. https://labs.leaningtech.com/blog/browserpod-deep-dive Node.js is now fully supported, Python is in preview and Rust is coming soon. For a glimpse of the possibilities, check our Claude Code running fully in the browser: https://browsercode.io/claude
Are you running the version of Claude code that Anthropic distributes in the browser or did you have to adapt it to run on your stack?
Cheers
Re: Running Python code in a sandbox with MicroPython and WASM
#34Earlier quoted context omitted.
Any thoughts on https://github.com/dylan-sutton-chavez/edge-python or http://edgepython.com/ ?
Ok that looks promising! I like that it's built for WASM, and the docs mention wasmtime here: https://edgepython.com/getting-started/what-it-is
I’d love to see if we can get GPU access within these runtimes, that’d be awesome.
Re: Running Python code in a sandbox with MicroPython and WASM
#35We are working to solve the "sandoxing in Wasm" problem across multiple runtimes. https://labs.leaningtech.com/blog/browserpod-deep-dive Node.js is now fully supported, Python is in preview and Rust is coming soon. For a glimpse of the possibilities, check our Claude Code running fully in the browser: https://browsercode.io/claude
Been working on something similar based on Webcontainers. How does your Node.js support compare with StackBlitz technology? Are you running the version of Claude code that Anthropic distributes in the browser or did you have to adapt it to run on your stack? Cheers
The version of Claude Code you see running is completely unmodified.
Re: Running Python code in a sandbox with MicroPython and WASM
#36If you're interested in not reinventing the sandbox for LLMs, consider Judge0: https://judge0.com/ I have absolutely no relation to the project except for the fact that I went to the same Uni as the creator.
Re: Running Python code in a sandbox with MicroPython and WASM
#37If you're interested in not reinventing the sandbox for LLMs, consider Judge0: https://judge0.com/ I have absolutely no relation to the project except for the fact that I went to the same Uni as the creator.
Do you know if it has any kind of orchestration/queue support or if there's another project that does it embedding Judge0?
Re: Running Python code in a sandbox with MicroPython and WASM
#38Earlier quoted context omitted.
Been working on something similar based on Webcontainers. How does your Node.js support compare with StackBlitz technology? Are you running the version of Claude code that Anthropic distributes in the browser or did you have to adapt it to run on your stack? Cheers
Our technology is much more general that WebContainers, and it's based on a Linux-compatible WebAssembly kernel. It also supports real command line tools, including git, bash and the complete set of busybox utilities. The version of Claude Code you see running is completely unmodified.
Re: Running Python code in a sandbox with MicroPython and WASM
#39Earlier quoted context omitted.
Our technology is much more general that WebContainers, and it's based on a Linux-compatible WebAssembly kernel. It also supports real command line tools, including git, bash and the complete set of busybox utilities. The version of Claude Code you see running is completely unmodified.
Awesome, what approach are you using? Is this a real micro kernel architecture or just containerized VM?
We have quite a bit of experience on the topic however, these are previous projects of ours:
WebVM (https://webvm.io): x86 Debian shell running client-side in the browser via x86 -> WebAssembly JIT compilation
Browsercraft (https://browsercraft.cheerpj.com): Minecraft running unmodified in the browser via our WebAssembly JVM (CheerpJ)
Re: Running Python code in a sandbox with MicroPython and WASM
#40Earlier quoted context omitted.
Awesome, what approach are you using? Is this a real micro kernel architecture or just containerized VM?
The architecture is a fairly straightforward WebAssembly-native monolithic kernel. Most of the complexities come from making things work well within the browser constraints for real world, large apps. We have quite a bit of experience on the topic however, these are previous projects of ours: WebVM ( https://webvm.io ): x86 Debian shell running client-side in the browser via x86 -> WebAssembly JIT compilation Browser…
Keep up the great work