WASM and Python: The Future of Serverless Computing

Track:
Web Development, Web APIs, Front-End Integration
Type:
Talk
Level:
beginner
Duration:
30 minutes

Abstract

In this talk, we’ll explore how WebAssembly enables running Python in isolated and scalable environments. We’ll look at practical use cases, from serverless function execution to sandboxed environments, and how tools like wasmtime, wasmer, and Pyodide make this possible. Will also try to cover comparisons to show where WASM shines, and where it still falls short for Python developers today.

Traditional serverless platforms rely on containers (like Docker), which have overhead in terms of cold start times, resource usage, and security risks. WASM provides a lightweight alternative that allows faster execution, stronger isolation, and cross-platform portability.

However, Python was not designed for WASM. It relies on system calls and C-based extensions, which makes running it in a WASM runtime tricky. This talk will address how to bridge that gap and bringing around Python in the WASM ecosystem.

Outline:

  1. WASM vs. Containers – Why WASM is faster, more secure, and better suited for serverless workloads.
  2. Python’s Challenges in WASM – System call dependencies, native extensions, and performance trade-offs.
  3. Making Python Work in WASM – Running Python using Pyodide, wasmtime, and wasmer for lightweight APIs and ML inference.
  4. Deploying a FastAPI function in a WASM runtime and benchmarking it against a traditional serverless container.