Skip to content

Emscripten: No extra rustc-cdylib-link-args on Rust >= 1.95#5874

Merged
davidhewitt merged 2 commits intoPyO3:mainfrom
hoodmane:emscripten-no-flags-rust-1.95
Mar 13, 2026
Merged

Emscripten: No extra rustc-cdylib-link-args on Rust >= 1.95#5874
davidhewitt merged 2 commits intoPyO3:mainfrom
hoodmane:emscripten-no-flags-rust-1.95

Conversation

@hoodmane
Copy link
Contributor

We used to have to pass extra flags to build with Emscripten but

  1. Emscripten 4.0.0 made WASM_BIGINT automatic
  2. Rust version 1.95 learned how to build cdylibs Implement set_output_kind for Emscripten linker rust-lang/rust#151704

We use Emscripten 3.1.58 to build for Python 3.12 which would be broken by dropping WASM_BIGINT but for Python 3.12 we also use JS eh which doesn't work at all with Rust version >= 1.93 so there's no added breakage.

On the other hand, Python 3.13 uses Emscripten 4.0.9 and doesn't need -sWASM_BIGINT.

@hoodmane hoodmane force-pushed the emscripten-no-flags-rust-1.95 branch 3 times, most recently from 301d797 to 468dfa4 Compare March 11, 2026 16:10
Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

Thanks - I also bumped ci to build with 3.14 in #5455

@hoodmane hoodmane force-pushed the emscripten-no-flags-rust-1.95 branch from 468dfa4 to 9759ea7 Compare March 12, 2026 16:57
We used to have to pass extra flags to build with Emscripten but
1. Emscripten 4.0.0 made WASM_BIGINT automatic
2. Rust version 1.95 learned how to build cdylibs rust-lang/rust#151704

We use Emscripten 3.1.58 to build for Python 3.12 which would be broken by
dropping WASM_BIGINT but for Python 3.12 we also use JS eh which doesn't
work at all with Rust version >= 1.93 so there's no added breakage.

On the other hand, Python 3.13 uses Emscripten 4.0.9 and doesn't need
`-sWASM_BIGINT`.
@hoodmane hoodmane force-pushed the emscripten-no-flags-rust-1.95 branch from 9759ea7 to 2d583f7 Compare March 12, 2026 16:57
@codspeed-hq
Copy link

codspeed-hq bot commented Mar 12, 2026

Merging this PR will not alter performance

✅ 105 untouched benchmarks
⏩ 1 skipped benchmark1


Comparing hoodmane:emscripten-no-flags-rust-1.95 (b2c960a) with main (42a35d9)

Open in CodSpeed

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports.

Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

Thanks, I'll go ahead and apply what I think fixes the pipeline.

@davidhewitt davidhewitt enabled auto-merge March 13, 2026 10:26
@davidhewitt davidhewitt added this pull request to the merge queue Mar 13, 2026
Merged via the queue into PyO3:main with commit 1d26e82 Mar 13, 2026
82 of 90 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants