Upgrade to Pro — share decks privately, control downloads, hide ads and more …

WebAssembly, Python, and the Future of AI Sandb...

WebAssembly, Python, and the Future of AI Sandboxing

AI workloads increasingly require secure, fast, and portable environments for running code, without the overhead of containers or VMs. WebAssembly (Wasm) offers a lightweight sandbox that runs anywhere: on servers, on the edge, and even directly in the browser.

In this talk, we’ll explore how Python and WebAssembly work together to safely execute untrusted or distributed workloads, what makes Wasm’s capability-based security model unique, and why it’s becoming a key building block for modern AI systems. We’ll also look at how Wasmer expands what’s possible for Python developers beyond the web.

Avatar for Syrus Akbary

Syrus Akbary

February 05, 2026
Tweet

More Decks by Syrus Akbary

Other Decks in Programming

Transcript

  1. WebAssembly, Python, and the Future of AI Sandboxing Syrus Akbary

    Feb 2026 Rethinking safe code execution for the AI era
  2. What is Wasmer? Wasmer is a WebAssembly Platform • Runtime

    (Analogy: Docker) • Registry (Analogy: Docker Hub or NPM) • Edge (Analogy: AWS Lambda) Wasmer runs applications as Wasm modules instead of containers or virtual machines
  3. • Do not share kernel or OS • Poor performance

    • Very low density • Shares a kernel, but not the OS or binary • Still very heavy- weight • Low density • Shares a kernel, and the binary executables • Fully sandboxed • High density
  4. Modern systems increasingly execute code we didn't write The question

    is no longer if — but how to execute safely and ef f iciently
  5. Why this matters We need a new Execution Primitive More

    Ephemeral Short-lived workloads More Multi-tenant Shared infrastructure More Untrusted AI-generated code
  6. Browser- f irst Pyodide is the most popular framework. Is

    Python compiled to Wasm via Emscripten. Used by: • JupyterLite • PyScript(.com) • Anaconda Cloud • Cloud f lare Optimized for JS execution
  7. Server- f irst You can run pyodide in Node.js (very

    heavy). Or you can run it with Wasmer. Used by: • Wasmer Edge (hosting) • AI Companies Optimized for density and sandboxing
  8. But Pyodide has constraints No Raw Sockets Limited by the

    browser's networking model, preventing direct socket access. Limited POSIX Compatibility constraints mean certain system-level operations are restricted. No Multithreading Python code executes on a single browser thread, limiting parallel computation. No Subprocesses/Greenlets Prevents parallel processing within the Python environment for tasks like I/O concurrency. Not designed for server workloads (even though Cloud f lare uses it)
  9. Why the Python+Wasm on the server matters …specially for AI

    workloads Sandboxing is now a core infrastructure requirement • Untrusted Python code execution • Fast response/startup times • High Density
  10. The emerging Sandboxing Pattern Resource Limits • CPU, memory, execution

    time constraints Capability-based access • Filesystem permissions • Networking permissions High performance • High density • Fast startup times
  11. Browser- f irst Optimized for JS execution Optimized for density

    and sandboxing Server- f irst ❤ Enables • 👨💻 Zero modi f ications • 🚀 Run in any environment and OS • ⚡ Extremely lightweight Without limitations • ✅ Greenlets • ✅ Multithreaded • ✅ Subprocess
  12. Wasmer Clouds vs Docker Clouds Containers • Heavy isolation overhead

    • Slow startup times • Low tenant density WebAssembly • Shared sandboxed execution • Extremely fast startup times • High tenant density
  13. One year free of Wasmer Pro account 1. Create an

    account https://wasmer.io/ 2.Reach [email protected] with your username