Skip to content

Conversation

@kleisauke
Copy link
Collaborator

The --experimental-wasm-exnref flag has been available since Node.js 22, see commit:
nodejs/node@09a8440

The `--experimental-wasm-exnref` flag has been available since
Node.js 22, see commit:
nodejs/node@09a8440
@kleisauke
Copy link
Collaborator Author

FWIW, Node.js 25 ships this unflagged (see e.g. commit nodejs/node@fff0d15). However, it's not an LTS release.

@sbc100
Copy link
Collaborator

sbc100 commented Oct 26, 2025

Can you try rebasing, a codesize update just landed.

@sbc100
Copy link
Collaborator

sbc100 commented Oct 26, 2025

One issue the consider is that because --experimental-wasm-exnref is an experimental flag, the implementation might not be correct, or it might not be correct in one version node.

I wonder if we should only consider unflagged features here in the this file?

@kleisauke
Copy link
Collaborator Author

Good question. I'm not sure what the best way to handle this is. I think there's a similar issue with Feature.JS_BIGINT_INTEGRATION, which doesn't match the versions shown on https://webassembly.org/features/ (i.e. it needs --experimental-wasm-bigint for Node.js versions before v16).

@kleisauke
Copy link
Collaborator Author

Is it OK to land this? For full context: it allows me to compile and link with -fwasm-exceptions -sWASM_LEGACY_EXCEPTIONS=0 in the pre-built emsdk Dockerfile. Without it, all runtime checks fail with the following error:

/src/build/deps/glib/_build/meson-private/tmp91ds8ed9/output.js:19
    throw new Error(`This emscripten-generated code requires node v${ packedVersionToHumanReadable(240000) } (detected v${packedVersionToHumanReadable(currentNodeVersion)})`);
    ^

Error: This emscripten-generated code requires node v24.0.0 (detected v22.16.0)
    at /src/build/deps/glib/_build/meson-private/tmp91ds8ed9/output.js:19:11
    at Object.<anonymous> (/src/build/deps/glib/_build/meson-private/tmp91ds8ed9/output.js:36:3)
    at Module._compile (node:internal/modules/cjs/loader:1730:14)
    at Object..js (node:internal/modules/cjs/loader:1895:10)
    at Module.load (node:internal/modules/cjs/loader:1465:32)
    at Function._load (node:internal/modules/cjs/loader:1282:12)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:171:5)
    at node:internal/main/run_main_module:36:49

Node.js v22.16.0

@sbc100 sbc100 merged commit d17865f into emscripten-core:main Oct 30, 2025
34 checks passed
@kleisauke kleisauke deleted the lower-wasm-exnref-feature branch October 30, 2025 16:51
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.

2 participants