emscripten
emscripten copied to clipboard
[jspi] Switch to new JSPI API.
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.
We should wait for chrome unstable to include the new API (v126.0.6430) before we land this.
This would make asyncify useless, right?
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.
This PR also depends on https://github.com/WebAssembly/binaryen/pull/6546
It seems that we have to solve #21081 before completely going over.