Back to articles

WebAssembly JSPI is going to origin trial

via V8 BlogFrancis McCabe, Thibaud Michaud, Ilya Rezvov, Brendan Dahl

WebAssembly’s JavaScript Promise Integration (JSPI) API is entering an origin trial, with Chrome release M123. What that means is that you can test whether you and your users can benefit from this new API. JSPI is an API that allows so-called sequential code – that has been compiled to WebAssembly – 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. When the action is finally performed, the browser’s task runner invokes any callbacks with the Promise. JSPI hooks into this architecture to allow a WebAssembly application to be suspended when the Promise is returned and resumed when the Promise is resolved. You can find out more about JSPI and how to use it here and the specification itself is here . Requirements # Apart from registering for an origin trial, you will also need to generate the appropriate WebAssembly and JavaScript. If you are using

Continue reading on V8 Blog

Opens in a new tab

Read Full Article
3 views

Related Articles