Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jspi] Switch to new JSPI API. #21815

Merged
merged 3 commits into from
May 22, 2024

Conversation

brendandahl
Copy link
Collaborator

Differences with the new API:

  • The JS engine now takes care of the suspender, so we don't need to modify the wasm file with binaryen.
  • Imports and exports and are now marked as async with WebAssembly.Suspending and WebAssembly.promising wrappers.

@brendandahl
Copy link
Collaborator Author

We should wait for chrome unstable to include the new API (v126.0.6430) before we land this.

@msqr1
Copy link

msqr1 commented Apr 25, 2024

This would make asyncify useless, right?

@brendandahl
Copy link
Collaborator Author

This would make asyncify useless, right?

Potentially, it will probably be awhile before JSPI is supported everywhere though. There's also a few areas where binaryen's asyncify is slightly different and may be preferred.

@brendandahl
Copy link
Collaborator Author

This PR also depends on WebAssembly/binaryen#6546

@msqr1
Copy link

msqr1 commented Apr 26, 2024

It seems that we have to solve #21081 before completely going over.

@brendandahl brendandahl force-pushed the jspi-new-api branch 2 times, most recently from 7855916 to e6e8ac0 Compare April 30, 2024 18:24
@brendandahl brendandahl force-pushed the jspi-new-api branch 2 times, most recently from f5e8b95 to f6e43a8 Compare May 21, 2024 21:06
Differences with the new API:
 - The JS engine now takes care of the suspender, so we don't need
  to modify the wasm file with binaryen.
 - Imports and exports and are now marked as async with
  WebAssembly.Suspending and WebAssembly.promising wrappers.
@brendandahl brendandahl merged commit 4d22ffe into emscripten-core:main May 22, 2024
4 of 12 checks passed
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.

None yet

3 participants