w3ctag / design-reviews

W3C specs and API reviews
Creative Commons Zero v1.0 Universal
322 stars 55 forks source link

WebAssembly JavaScript Promise Integration API #809

Open fgmccabe opened 1 year ago

fgmccabe commented 1 year ago

Wotcher TAG!

I'm requesting a TAG review of JSPI.

The WebAssembly JavaScript Promise Integration (JSPI) API is a standard-track effort of the WebAssembly WG (via its CG) to allow WebAssembly applications to access asynchronous APIs, under the constraint that the only changes are to the JS API and not to core WebAssembly (or to JavaScript)

Further details:

You should also know that...

  1. The purpose of this API is to allow WebAssembly applications originally written against synchronous APIs to work with APIs that are mostly asynchronous in nature (i.e., Web APIs). WebAssembly code is typically compiled from languages like C++ that do not have a rich history of asynchronous functionality.
  2. We have been careful in the design to not require any changes to either the JavaScript language or the WebAssembly instruction set.
  3. We have been careful to constrain the design in such a way that JavaScript applications cannot use JSPI to implement alternate suspension mechanisms to those already part of the Web ecosystem. (I.e., JS programs cannot use JSPI to suspend themselves.)
  4. This is part of a larger effort to bring coroutining capabilities to WebAssembly. However, this is not dependent on those efforts and also has benefits that do not rely on 'core' stack switching.

We'd prefer the TAG provide feedback as (please delete all but the desired option):

☂️ open a single issue in our GitHub repo for the entire review. Note, if appropriate, it is also possible to initiate discussion topics on the repo

fgmccabe commented 9 months ago

I was wondering if there was any movement from the TAG on this issue. We are hoping to ship this API in 24H1.

fgmccabe commented 4 months ago

Chrome (M123) is just about to enter origin trial for this feature.