Skip to content

Commit

Permalink
Update src/blog/jspi-newapi.md
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas Steiner <steiner.thomas@gmail.com>
  • Loading branch information
fgmccabe and tomayac authored May 31, 2024
1 parent 35626ee commit 51ecf31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/blog/jspi-newapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tags:
---
WebAssembly’s JavaScript Promise Integration (JSPI) API has a new API, available in Chrome release M126. We talk about what has changed, how to use it with Emscripten, and what is the roadmap for JSPI.

JSPI is an API that allows WebAssembly applications that use *sequential* APIs to access Web APIs that are *asynchronous*. Many Web APIs are crafted in terms of JavaScript `Promise`s: instead of immediately performing the requested operation they return a `Promise` to do so. On the other hand, many applications compiled to WebAssembly come from the C/C++ universe which is dominated by APIs that block the caller until they are completed.
JSPI is an API that allows WebAssembly applications that use *sequential* APIs to access Web APIs that are *asynchronous*. Many Web APIs are crafted in terms of JavaScript `Promise` objects: instead of immediately performing the requested operation, they return a `Promise` to do so. On the other hand, many applications compiled to WebAssembly come from the C/C++ universe, which is dominated by APIs that block the caller until they are completed.

JSPI hooks into the Web architecture to allow a WebAssembly application to be suspended when the `Promise` is returned and resumed when the `Promise` is resolved.

Expand Down

0 comments on commit 51ecf31

Please sign in to comment.