Skip to content

Conversation

adqm
Copy link
Contributor

@adqm adqm commented Aug 2, 2025

This patch includes some updates to the instructions for building for Emscripten, based on discussion from python/cpython#137312 and python/cpython#137025, with the goal of reducing duplicated information between the dev guide and Tools/wasm/README.md in the CPython repo.

Specifically, this patch makes the following changes:

  • updates emsdk version information

  • links to Tools/wasm/README.md for usage instructions beyond what's shown here

  • adds a note about ccache

  • adds a note about minimum Python version required for Tools/wasm/emscripten build


📚 Documentation preview 📚: https://cpython-devguide--1621.org.readthedocs.build/

* update emsdk version information

* link to `Tools/wasm/README.md` for usage instructions beyond what's shown here

* add note about ccache

* add note about minimum Python version for `Tools/wasm/emscripten build`
Copy link
Contributor

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; a couple of minor corrections/clarifications inline.

CPython you're building:

* For building CPython 3.14, use ``emsdk`` version ``4.0.11``.
* For building CPython 3.13, use ``emsdk`` version ``4.0.5``.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this isn't correct... but I don't know what is correct. I'm fairly certian it's 3.something...

However, it might be better to leave this line off entirely. Emscripten isn't Tier 3 for 3.13. Having specific build instructions implies (to me) that it should work, and that definitely won't be the case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds good to me; sorry for the error! Makes sense only to include it for 3.14+.

@hoodmane
Copy link
Contributor

hoodmane commented Aug 3, 2025

I'll review this tomorrow. Thanks @adqm !

@python python deleted a comment from hoodmane Aug 3, 2025
Copy link
Contributor

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll leave it to @hoodmane to provide final confirmation that this is all correct (including the EM_COMPILER_WRAPPER thing); but otherwise, I'm happy with this.

Copy link
Contributor

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two minor updates following Hugo's agreement to allow bumping the EMSDK version for RC2.

@hoodmane - are you able to confirm the last details so we can merge this?

Co-authored-by: Russell Keith-Magee <[email protected]>
``Tools/wasm/emscripten build`` command (which should be run with a recent
version of Python you have installed on your machine):
``Tools/wasm/emscripten build`` command, which should be run with a recent
version of Python (3.13 or newer) already installed on your machine:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been running it with 3.12 but it's harmless to say 3.13 here.

Copy link
Contributor

@hoodmane hoodmane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks @adqm !

@AA-Turner AA-Turner merged commit 87c99bc into python:main Sep 17, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants