Compiling Python to WASM
Python is one of the most popular programming languages in the world. But when it comes to running in the browser, it still lags behind. Existing solutions like Pyodide and RustPython attempts to bridge the gap using CPython or transpilation, but they come with significant trade-offs: large payload sizes, slow startup times, and compatibility constraints.
This talk explores the current Python + WebAssembly (WASM) ecosystem and its limitations. We’ll look at how projects like Pyodide, PyScript, and RustPython attempt to make Python web-native and why they fall short. Then, we’ll dive into why a native Python-to-WASM compiler is the missing piece and how such a compiler could radically improve performance, portability, and adoption.
We wrote a native python to wasm compiler, called Waspy, which we'll talk about and how various python components and types are compiled and placed.