Discussion
Search code, repositories, users, issues, pull requests...
jacob019: Anyone using it with nodejs to make a sandbox for code agents?
yawnxyz: no but it works great in conjunction with observable and d3js for pretty interactives!
jcheng: For that purpose I think most people are using bubblewrap or seatbelt/sandbox-exec with CPython.
simonw: I've done some experiments along those lines with Pyodide in Deno: https://til.simonwillison.net/deno/pyodide-sandbox
devsda: There's also xeus-cpp which is cpp based on wasm. Xeus-cpp and pyodide are the backends for Jupyterlite [1] kernels in browser.It's actually a very good way to teach coding in python/c++(11, 17 or even 23), or explore language features or your own library within browser and allow students to execute code by hosting just some static html pages and some assets without any backend.1. https://jupyter.org/try-jupyter/lab/
simonw: Pyodide is one of the hidden gems of the Python ecosystem. It's SO good at what it does, and it's nearly 8 years old now so it's pretty mature.I love using Pyodide to build web UIs for trying out new Python libraries. Here's one I built a few weeks ago to exercise my pure-Python SQLite AST parser, for example: https://tools.simonwillison.net/sqlite-astIt's also pretty easy[1] to get C or Rust libraries that have Python bindings compiled to a WebAssembly wheel that Pyodide can then load.Here's a bit of a nutty example - the new Monty Python-like sandbox library (written in Rust) compiled to WASM and then loaded in Pyodide in the browser: https://simonw.github.io/research/monty-wasm-pyodide/pyodide...[1] OK, Claude Code knows how to do it.