CTO News Hubb
Advertisement
  • Home
  • CTO News
  • IT
  • Technology
  • Tech Topics
    • AI
    • QC
    • Robotics
    • Blockchain
  • Contact
No Result
View All Result
  • Home
  • CTO News
  • IT
  • Technology
  • Tech Topics
    • AI
    • QC
    • Robotics
    • Blockchain
  • Contact
No Result
View All Result
CTO News Hubb
No Result
View All Result
Home IT

New Google V8 API bridges WebAssembly and asynchronous web

January 23, 2023
in IT


The developers of Google’s V8 JavaScript/WebAssembly engine have introduced the JavaScript Promise Integration (JSPI) API, allowing WebAssembly applications that assume access to external functionality is synchronous to smoothly function in asynchronous environments.

Currently in an experimental stage, JSPI should not be used in production applications yet, the developers said. Eventually, it will become a standard, for implementation across major browsers, they said.

Introduced in a V8 blog post on January 19, JSPI bridges synchronous WebAssembly applications and asynchronous web APIs. This is done by suspending the application when it issues a synchronous API call and resuming when the asynchronous I/O operation is concluded. And JSPI does this with very few changes to the application itself.

Many modern APIs on the web work asynchronously by splitting functionality into the initiation and resolution of an operation. JSPI intercepts the JavaScript Promise returned from an asynchronous API call, suspending the main logic of the WebAssembly application and returning a Promise from the export used to enter the WebAssembly application. When the asynchronous API completes, the WebAssembly application is resumed so it can process results of the API call.

Working with Promises is difficult, particularly with WebAssembly, because direct manipulation of Promises in WebAssembly is not possible, the developers said. JSPI allows developers to craft WebAssembly applications using synchronous APIs and still participate in the web’s asynchronous ecosystem.

JSPI is being developed on Intel and ARM64 architectures. It is available for Linux, Windows, macOS, and ChromeOS. Developers can test JSPI locally by going to chrome://flags in Chrome, searching for “Experimental WebAssembly JavaScript Promise Integration (JSPI),” and checking the box. Use of the Chrome Canary channel is recommended. JSPI cannot yet be enabled for end users.

WebAssembly has been hailed as a breakthrough in web application performance. The binary instruction format enables many different programming languages including C/C++, C#, and Rust to be used for web programming.

Copyright © 2023 IDG Communications, Inc.



Source link

Previous Post

What Does a New, $45M Cyber Catastrophe Bond Mean for the Cyber Insurance Industry?

Next Post

GitHub Sponsors will stop supporting PayPal

Next Post

GitHub Sponsors will stop supporting PayPal

Tech debt - the plague of digital businesses that never seems to go away - part 2

Trending News

Who Will Blockchain Put out of Business?

December 26, 2022

The Hard Truth About Performance — A Guide for CTOs

December 31, 2022

R1/beta4 – Release Notes | Haiku Project

December 23, 2022

© 2022 CTO News Hubb All rights reserved.

Use of these names, logos, and brands does not imply endorsement unless specified. By using this site, you agree to the Privacy Policy and Terms & Conditions.

Navigate Site

  • Home
  • CTO News
  • IT
  • Technology
  • AI
  • QC
  • Robotics
  • Blockchain
  • Contact

Newsletter Sign Up

No Result
View All Result
  • Home
  • CTO News
  • IT
  • Technology
  • Tech Topics
    • AI
    • QC
    • Robotics
    • Blockchain
  • Contact

© 2021 JNews – Premium WordPress news & magazine theme by Jegtheme.

SUBSCRIBE TO OUR WEEKLY NEWSLETTERS