Py2wasm – A Python to WASM Compiler

Wasmer, founded five years ago, has focused on expanding languages that target the web and beyond with WebAssembly. They have introduced py2wasm, a Python to WebAssembly compiler that enhances performance by eliminating interpreter overhead, resulting in programs running 3 times faster. Benchmarking shows that using py2wasm achieves about 70% of native Python speed and is 2.5~3x faster than the baseline. Various strategies are explored to optimize Python workloads in WebAssembly, including compiling a Python subset to Wasm, utilizing Python JITs like PyPy, and employing static analysis. Nuitka emerges as a promising tool for compiling Python to WebAssembly, paving the way for faster Python execution in WebAssembly environments.

https://wasmer.io/posts/py2wasm-a-python-to-wasm-compiler

To top