Closed fgmccabe closed 7 months ago
Thank you for proposing JavaScript Promise Integration for inclusion in Interop 2024.
We wanted to let you know that this proposal was not selected to be part of Interop this year.
As of the deadline, the specifications for JavaScript Promise Integration were not yet complete enough to allow interoperable implementations. To make progress on this area in the future, it will first be necessary to ensure that the feature has a clear specification in a standards track document.
For an overview of our process, see proposal selection. Thank you again for contributing to Interop 2024!
Posted on behalf of the Interop team.
Description
JavaScript Promise Integration (JSPI) is a standards track specification that enables WebAssembly programs to access asynchronous Web APIs.
This is currently at stage 3 in the W3C WebAssembly WG process. The full proposal can be seen at https://github.com/WebAssembly/js-promise-integration/blob/main/proposals/js-promise-integration/Overview.md.
This is currently implemented in Chrome for 64 bit platforms, and an implementation is underway for Firefox. Support for 32 bit platforms is under active development.
Specification
W3C WebAssembly CG
Open Issues
https://github.com/WebAssembly/js-promise-integration/issues
Tests
There is an active CL (https://chromium-review.googlesource.com/c/chromium/src/+/4908168) that will add JSPI tests to chromium and (by export) to wpt.fyi
Current Implementations
Standards Positions
There is currently implementation work underway by Mozilla to implement JSPI.
Browser bug reports
No response
Developer discussions
No response
Polls & Surveys
No response
Existing Usage
JSPI is only available experimentally at the moment; i.e., behind a flag. This will change when the standard is approved by the WebAssembly CG.
Workarounds
The main work around is to use the binaryen ASYNCIFY feature. However, this can double the WebAssembly code size and cause a substantial reduction in performance (due to how ASYNCIFY works, the amount of code increase and performance cost varies depending on the complexity of the original source).
Accessibility Impact
no impact
Privacy Impact
no impact
Other
There is a v8 blog post describing how programmers may access this at v8.dev/blog/jspi