Skip to content

CI: Fix wasm32 build#4510

Merged
lovell merged 3 commits intolovell:0.35from
kleisauke:0.35-fix-ci-wasm32
Mar 19, 2026
Merged

CI: Fix wasm32 build#4510
lovell merged 3 commits intolovell:0.35from
kleisauke:0.35-fix-ci-wasm32

Conversation

@kleisauke
Copy link
Contributor

@kleisauke kleisauke commented Mar 19, 2026

Bump emnapi to 1.9.1 for compatibility with Emscripten 5.0.3, see:
emscripten-core/emscripten@3051725

/cc @toyobayashi FYI.

@kleisauke
Copy link
Contributor Author

@kleisauke kleisauke marked this pull request as draft March 19, 2026 12:44
@kleisauke
Copy link
Contributor Author

@toyobayashi
Copy link

fixed in emnapi 1.9.1

@lovell
Copy link
Owner

lovell commented Mar 19, 2026

@kleisauke Thanks for investigating this and @toyobayashi thanks for the quick fix.

The remaining sharp test failure appears to relate to the new toUint8Array() method, which returns a transferable ArrayBuffer rather than a non-transferable SharedArrayBuffer.

I think the WebAssembly equivalent is the shared option passed to new WebAssembly.Memory({ shared: true }), which maybe emnapi always uses? Perhaps toUint8Array should fall back to the toBuffer behaviour when run as WebAssembly?

@kleisauke kleisauke force-pushed the 0.35-fix-ci-wasm32 branch from 99803d6 to b2dc727 Compare March 19, 2026 14:36
@kleisauke
Copy link
Contributor Author

From a quick look, an emnapi_sync_memory() call may be missing, which could be the reason for the toUint8Array() test failure.
https://toyobayashi.github.io/emnapi-docs/reference/list.html#arraybuffer-related

I'll investigate this later, but in the meantime I'm marking this PR as ready.

@kleisauke kleisauke marked this pull request as ready for review March 19, 2026 14:52
@lovell lovell merged commit 733f248 into lovell:0.35 Mar 19, 2026
32 checks passed
@kleisauke kleisauke deleted the 0.35-fix-ci-wasm32 branch March 19, 2026 15:32
@lovell
Copy link
Owner

lovell commented Mar 19, 2026

@kleisauke I fixed the test failure via commit 3879c9a (this was also affecting Electron).

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