Skip to content

Mark WASM_BIGINT as deprecated - #27558

Merged
sbc100 merged 1 commit into
emscripten-core:mainfrom
sbc100:deprecate_wasm_bigint
Aug 20, 2026
Merged

sbc100 merged 1 commit into
emscripten-core:mainfrom
sbc100:deprecate_wasm_bigint

Conversation

@sbc100

@sbc100 sbc100 commented Aug 17, 2026 •

Copy link
Copy Markdown
Collaborator

With the minimum Safari version bumped to 15 in #27542, WebAssembly
BigInt integration (WASM_BIGINT) is now standard and enabled by
default across all supported engines. The only remaining use case
for disabling it is internally for WASM2JS (-sWASM=0).

Users should no longer set -sWASM_BIGINT directly, so mark
WASM_BIGINT as deprecated.

@sbc100
sbc100 force-pushed the deprecate_wasm_bigint branch 4 times, most recently from 53f4bfa to aacd30c Compare August 17, 2026 23:08
@sbc100
sbc100 requested a review from kripken August 17, 2026 23:08
@sbc100
sbc100 force-pushed the deprecate_wasm_bigint branch 2 times, most recently from 3eac9d9 to d91112d Compare August 18, 2026 00:31
@sbc100 sbc100 changed the title Mark WASM_BIGINT as deprecated Mark WASM_BIGINT as deprecated and remove LEGALIZE_JS_FFI Aug 18, 2026
@sbc100
sbc100 force-pushed the deprecate_wasm_bigint branch from d91112d to 379c882 Compare August 18, 2026 00:33
Comment thread site/source/docs/tools_reference/settings_reference.rst Outdated
Comment thread ChangeLog.md Outdated
Comment thread ChangeLog.md Outdated

@kripken kripken left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm % comments

sbc100 added a commit to sbc100/emscripten that referenced this pull request Aug 18, 2026
sbc100 added a commit to sbc100/emscripten that referenced this pull request Aug 18, 2026
sbc100 added a commit to sbc100/emscripten that referenced this pull request Aug 18, 2026
sbc100 added a commit that referenced this pull request Aug 19, 2026
This setting has already been deprecated for a long time. Flipping its
default is really no-op here but it makes the followup changes to remove
it simpler.

Split out from #27558.
sbc100 added a commit to sbc100/emscripten that referenced this pull request Aug 19, 2026
Move `LEGALIZE_JS_FFI` to `LEGACY_SETTINGS` (accepting only `0` for
backwards compatibility). JS FFI legalization is no longer needed
under the default `WASM_BIGINT` configuration and is now conditioned
directly on `WASM_BIGINT=0`.

Split out from emscripten-core#27558.
sbc100 added a commit to sbc100/emscripten that referenced this pull request Aug 19, 2026
Move `LEGALIZE_JS_FFI` to `LEGACY_SETTINGS` (accepting only `0` for
backwards compatibility). JS FFI legalization is no longer needed
under the default `WASM_BIGINT` configuration and is now conditioned
directly on `WASM_BIGINT=0`.

Split out from emscripten-core#27558.
sbc100 added a commit that referenced this pull request Aug 19, 2026
Move `LEGALIZE_JS_FFI` to `LEGACY_SETTINGS` (accepting only `0` for
backwards compatibility). JS FFI legalization is no longer needed under
the default `WASM_BIGINT` configuration and is now conditioned directly
on `WASM_BIGINT=0`.

Split out from #27558.
sbc100 added a commit to sbc100/emscripten that referenced this pull request Aug 19, 2026
In `wasm-emscripten-finalize`, both `--bigint` and
`--no-legalize-javascript-ffi` have the exact same effect: they prevent
running the `legalize-js-interface` pass (`if (!bigInt &&
legalizeJavaScriptFFI)`).

Previously, when `WASM_BIGINT` was enabled, Emscripten was passing both
`--bigint` and `--no-legalize-javascript-ffi`. In addition, when
`AUTODEBUG` was enabled, `--bigint` was appended a second time.

Consolidate the check so `--bigint` is passed once when either
`WASM_BIGINT` or `AUTODEBUG` is enabled, and remove the redundant
`--no-legalize-javascript-ffi` flag.

Split out from emscripten-core#27558.
sbc100 added a commit that referenced this pull request Aug 19, 2026
In `wasm-emscripten-finalize`, both `--bigint` and
`--no-legalize-javascript-ffi` have the exact same effect: they prevent
running the `legalize-js-interface` pass (`if (!bigInt &&
legalizeJavaScriptFFI)`).

Previously, when `WASM_BIGINT` was enabled, Emscripten was passing both
`--bigint` and `--no-legalize-javascript-ffi`. In addition, when
`AUTODEBUG` was enabled, `--bigint` was appended a second time.

Consolidate the check so `--bigint` is passed once when either
`WASM_BIGINT` or `AUTODEBUG` is enabled, and remove the redundant
`--no-legalize-javascript-ffi` flag.

Split out from #27558.
@sbc100 sbc100 changed the title Mark WASM_BIGINT as deprecated and remove LEGALIZE_JS_FFI Mark WASM_BIGINT as deprecated Aug 19, 2026
@sbc100
sbc100 force-pushed the deprecate_wasm_bigint branch 2 times, most recently from 0aa057c to 45a6db8 Compare August 19, 2026 22:43
With the minimum Safari version bumped to 15 in emscripten-core#27542, WebAssembly
BigInt integration (`WASM_BIGINT`) is now standard and enabled by
default across all supported engines. The only remaining use case
for disabling it is internally for `WASM2JS` (`-sWASM=0`).

Users should no longer set `-sWASM_BIGINT` directly, so mark
`WASM_BIGINT` as deprecated.
@sbc100
sbc100 force-pushed the deprecate_wasm_bigint branch from 45a6db8 to 3c8872f Compare August 20, 2026 00:22
@sbc100
sbc100 merged commit aeb6792 into emscripten-core:main Aug 20, 2026
7 of 22 checks passed
@sbc100
sbc100 deleted the deprecate_wasm_bigint branch August 20, 2026 00:23
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 29, 2026
…smtm

Bump min Emscripten version to 4.0, drop deprecated -sWASM_BIGINT for wasm32-unknown-emscripten

This documents Emscripten 4.0.0 as the minimum supported version, and removes the on-by-default `-sWASM_BIGINT` link argument from the `wasm32-unknown-emscripten` target spec.

`WASM_BIGINT` has been enabled by default since Emscripten 4.0.0 (January 2025), and newer Emscripten versions now emit a deprecation warning whenever it is set explicitly (emscripten-core/emscripten#27558), so every link through rustc currently produces a warning. Since Emscripten's warning categories are not fine-grained enough to suppress this one setting without also disabling `-Wdeprecated` in general, the cleanest fix is to drop the flag and rely on the default.

* `-sWASM_BIGINT` removed from the target's post-link args (`-sABORTING_MALLOC=0` is retained)
* Platform support docs updated to state the Emscripten 4.0.0 minimum, with the install snippet using `latest` rather than pinning 3.1.68

Rust CI already installs the latest Emscripten release, so no CI changes are needed. Users on Emscripten < 4.0.0 who rely on the prebuilt `std` would need to upgrade or pass `-C link-arg=-sWASM_BIGINT` explicitly.
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Sep 29, 2026
Rollup merge of #162839 - guybedford:emscripten-min-4, r=madsmtm

Bump min Emscripten version to 4.0, drop deprecated -sWASM_BIGINT for wasm32-unknown-emscripten

This documents Emscripten 4.0.0 as the minimum supported version, and removes the on-by-default `-sWASM_BIGINT` link argument from the `wasm32-unknown-emscripten` target spec.

`WASM_BIGINT` has been enabled by default since Emscripten 4.0.0 (January 2025), and newer Emscripten versions now emit a deprecation warning whenever it is set explicitly (emscripten-core/emscripten#27558), so every link through rustc currently produces a warning. Since Emscripten's warning categories are not fine-grained enough to suppress this one setting without also disabling `-Wdeprecated` in general, the cleanest fix is to drop the flag and rely on the default.

* `-sWASM_BIGINT` removed from the target's post-link args (`-sABORTING_MALLOC=0` is retained)
* Platform support docs updated to state the Emscripten 4.0.0 minimum, with the install snippet using `latest` rather than pinning 3.1.68

Rust CI already installs the latest Emscripten release, so no CI changes are needed. Users on Emscripten < 4.0.0 who rely on the prebuilt `std` would need to upgrade or pass `-C link-arg=-sWASM_BIGINT` explicitly.
pull Bot pushed a commit to LeeeeeeM/miri that referenced this pull request Sep 30, 2026
Bump min Emscripten version to 4.0, drop deprecated -sWASM_BIGINT for wasm32-unknown-emscripten

This documents Emscripten 4.0.0 as the minimum supported version, and removes the on-by-default `-sWASM_BIGINT` link argument from the `wasm32-unknown-emscripten` target spec.

`WASM_BIGINT` has been enabled by default since Emscripten 4.0.0 (January 2025), and newer Emscripten versions now emit a deprecation warning whenever it is set explicitly (emscripten-core/emscripten#27558), so every link through rustc currently produces a warning. Since Emscripten's warning categories are not fine-grained enough to suppress this one setting without also disabling `-Wdeprecated` in general, the cleanest fix is to drop the flag and rely on the default.

* `-sWASM_BIGINT` removed from the target's post-link args (`-sABORTING_MALLOC=0` is retained)
* Platform support docs updated to state the Emscripten 4.0.0 minimum, with the install snippet using `latest` rather than pinning 3.1.68

Rust CI already installs the latest Emscripten release, so no CI changes are needed. Users on Emscripten < 4.0.0 who rely on the prebuilt `std` would need to upgrade or pass `-C link-arg=-sWASM_BIGINT` explicitly.
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.

3 participants