Stream: SIG-Guest-Languages

Topic: Python Enhancement Proposals (PEPs) for WASI


view this post on Zulip Brett Cannon (Apr 16 2025 at 20:15):

In the last Python meeting -- @Joel Dice , @Ben Brandt -- we agreed we are getting to the point of wanting to get WASI support a bit more defined so wheels could get uploaded to PyPI. Emscripten/Pyodide is going through this exercise right now via https://peps.python.org/pep-0783/ and https://peps.python.org/pep-0776/ for packaging and CPython, respectively (see the Discussions-To header for links to the relevant discuss.python.org topics).

I will say that I think we will be able to upload wheels even if pip and such can't use the wheels as-is (i.e. lack of dynamic linking). Since Emscripten requires there own hacked copy of pip I think that helps pave the way for WASI wheels.

I asked in https://discuss.python.org/t/pep-783-emscripten-packaging/86862/60 about their approach as it doesn't go the way I was thinking we should go. I will see what's decided about my questions.

This PEP proposes a new platform tag series pyodide for binary Python package distributions for the Pyodide Python runtime.
Emscripten is a complete open source compiler toolchain. It compiles C/C++ code into WebAssembly/JavaScript executables, for use in JavaScript runtimes, including browsers and Node.js. The Rust language also maintains an Emscripten target.
Discussions related to the Python Programming Language, Python Community, and Python Software Foundation operations.
How is one to determine what version of Emscripten to use for a given pyodide_${YEAR}_${PATCH}_wasm32 tag? I didn’t find anything in either PEPs 783 or 776 to figure that out. And I’m not looking for anything fancy here via code, it could be as simple as “this table in the PEP” or something. But as it stands (assuming I’m not missing anything), there isn’t a way for me to know what Emscripten version to compile with to be compatible with a specific platform tag. Using the year also limits you t...

view this post on Zulip Ben Brandt (Apr 23 2025 at 09:02):

@Brett Cannon for some reason I can't read this entire message... Zulip seems to be cutting this off. But I would love to read through these

view this post on Zulip Ralph (Apr 23 2025 at 12:09):

oh that's interesting.... it won't scroll for me, either....

view this post on Zulip Ralph (Apr 23 2025 at 12:10):

but I think the text is the last of it, and the part we can't see is merely the cards for each PEP

view this post on Zulip Ralph (Apr 23 2025 at 12:10):

but the links are above that....

view this post on Zulip Brett Cannon (Apr 23 2025 at 17:05):

Ralph said:

but I think the text is the last of it, and the part we can't see is merely the cards for each PEP

Correct; the previews aren't important as they are just for links in the main part. So if you can see, "I will see what's decided about my questions", then you see everything that's important.

view this post on Zulip Brett Cannon (Nov 06 2025 at 20:20):

I have written a draft PEP for specifying the WASI support for CPython: https://github.com/brettcannon/peps/blob/wasi-support-pep/peps/pep-NNNN.rst

Let me know if you have any concerns about what I'm proposing, but it's in line with what I have discussed with others before, but with locking down at the first beta instead of alpha (as that's when we lock down ABI compatibility short of emergencies for CPython itself).

Python Enhancement Proposals. Contribute to brettcannon/peps development by creating an account on GitHub.

view this post on Zulip Brett Cannon (Dec 08 2025 at 19:34):

https://discuss.python.org/t/pep-618-wasi-support/105237

The executive summary is: Lock down WASI and WASI SDK version support at b1 for the life of a Python version and write it down in PEP 11 Changes to the WASI SDK version after b1 requires writing down why Changes to the WASI version require SC approval Updating the target triple for main in PEP 11 doesn’t require anything special. I’ve cleared this with the appropriate folks at the Bytecode Alliance and our current and future RMs are aware of it.

Last updated: Jan 09 2026 at 13:15 UTC