Repository navigation
CI: free-threaded 3.15t wasm build with pthreads (#175 step 1) - #397
Merged
Merged
Conversation
…eads (#175) Owner approval 2026-11-13. New build-ft-wasm.yml (dispatch, push on develop and pull requests on its own paths) and .github/scripts/ft-wasm/build-wasm.sh: --disable-gil --enable-wasm-pthreads, libffi and mpdec with -pthread, a call-trampoline patch for shared memory, then a node smoke test that starts four threads with the GIL disabled. Artifact only; no release. docs/platforms/free-threaded-wasm.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #175 (step 1: the build experiment). Owner approval 2026-11-13: "#175 may add the new wasm 3.15t CI build job".
What
.github/workflows/build-ft-wasm.ymlruns on dispatch, on push to develop that touches its own paths, and on pull requests that touch them. Its dispatch inputs arepython_version,emscripten_version(empty means CPython's own pin, 4.0.19 for 3.15.0) andtrampoline_patch(applyorskip). It uploads one artifact and publishes no release..github/scripts/ft-wasm/build-wasm.shis separate frompython-multiplatform/scripts/wasm/build-cpython.sh. That script is pinned to 3.14.2 and Emscripten 5.0.3, and feeds the wasmJs test runtime, which this job must not touch. The build uses CPython'sPlatforms/emscriptendriver with--disable-gil --enable-wasm-pthreads,-pthread -sPTHREAD_POOL_SIZE=8 -sMAXIMUM_MEMORY=2GB, libffi and mpdec built with-pthread, and a small asserted patch so the call trampoline falls back to CPython's JS trampoline when memory is shared.Py_GIL_DISABLEDin the build Python and in the hostpyconfig.h;python.wasm;python3.15t;smoke.pyunder node (GIL disabled, 4 threads join with correct results), in the build tree and again from the unpacked archive.docs/platforms/free-threaded-wasm.mdhas a "Not verified" list.wasm-design.mdgets a pointer to it.The Emscripten pin, the flags and the patch are experiment choices (agent proposal, not confirmed). The pin is still open: CPython 3.15.0 pins 4.0.19, while our wasmJs runtime uses 5.0.3.
Expected
This has never run anywhere. The likely first hard failure is the
make-hostlink. This PR's own workflow run is the experiment.Not in this PR (later #175 steps)
Thread.startfrom Kotlin.Category: feature added (CI build experiment), documentation corrected.