From 51ecf310094ac244d287ccb92b9e77c9a08de805 Mon Sep 17 00:00:00 2001 From: Francis McCabe Date: Fri, 31 May 2024 09:41:37 -0700 Subject: [PATCH] Update src/blog/jspi-newapi.md Co-authored-by: Thomas Steiner --- src/blog/jspi-newapi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blog/jspi-newapi.md b/src/blog/jspi-newapi.md index b61778d9..e4da438c 100644 --- a/src/blog/jspi-newapi.md +++ b/src/blog/jspi-newapi.md @@ -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.