--- # 2024 Plumber's Summit Brett Cannon Microsoft 2024-09-27 https://opensource.snarky.ca/Python/WASI --- ## How it all started "You should fix that ..." --- ## Current status - [Tier 2 platform](https://peps.python.org/pep-0011/#tier-2) for CPython under `wasm32-wasi` - Starting in Python 3.13 (due out in a week!) - Tested under [wasmtime](https://github.com/bytecodealliance/wasmtime) 22 & [WASI SDK](https://github.com/WebAssembly/wasi-sdk) 24 [in CI](https://github.com/python/cpython/blob/main/.github/workflows/reusable-wasi.yml) - [Tier 3](https://peps.python.org/pep-0011/#tier-3) for Python 3.11, 3.12 - Tested [via buildbots](https://buildbot.python.org/all/#/builders?tags=%2Bwasi&tags=%2Bstable) --- ## Plans --- ### Maintenance - Switch to `wasm32-wasip1` as the supported triple - Set up a dev [container with wasmtime and WASI SDK](https://github.com/python/cpython-devcontainers/issues/12) --- ### Enhancements - Try to build [NumPy](https://numpy.org/) and [pandas](https://pandas.pydata.org) into a `python.wasm` binary - Get [external dependencies](https://github.com/python/cpython-source-deps) like zlib compiled into `python.wasm` - Get a self-contained `python.wasm` - Official releases of `python.wasm` - `wasm32-wasip2` (at the bottom for a reason) --- ## Wish List --- ### Threading - VS Code wants it - [`test_socket`](https://github.com/python/cpython/blob/main/Lib/test/test_socket.py) needs it - Free-threading experiment starting in Python 3.13 (aka no more GIL) - This gets Python to `wasm32-wasip2` with networking --- ### Dynamic linking - Python developers expect to download a `.whl` file w/ a `.so` and be done - Currently [`componentize-py`](https://github.com/bytecodealliance/componentize-py) needs to add a step to embed the `.so` into `python.wasm` - JIT experiment starting in Python 3.13