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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

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.

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.
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