W3C makes WebAssembly a recommended standard

W3C Consortium объявил about giving WebAssembly technology the status of a recommended standard. WebAssembly provides a browser-independent, generic, low-level middleware for executing applications compiled from various programming languages. WebAssembly is positioned as a more promising and browser-portable technology for creating high-performance web applications. WebAssembly can be used to solve high performance tasks such as video encoding, audio processing, graphics and 3D manipulation, game development, cryptographic operations, mathematical calculations, and the creation of portable implementations of programming languages.

WebAssembly is similar to Asm.js in many ways, but differs in that it is a binary format that is not tied to JavaScript. WebAssembly does not require the use of a garbage collector, as it uses explicit memory management. Through the use of JIT for WebAssembly, you can achieve a level of performance close to native code. Among the main tasks of WebAssembly is the provision of portability, predictability of behavior and identity of code execution on different platforms. Lately WebAssembly also is advancing as a universal platform for secure code execution in any infrastructures, operating systems and devices, not limited to browsers.

The W3C has standardized three specifications related to WebAssembly:

  • Web Assembly Core - describes a low-level virtual machine for executing the WebAssembly intermediate code. WebAssembly-related resources come in the ".wasm" format, which resembles a Java ".class" file and contains static data and code segments to work with that data.
  • WebAssembly Web API - defines a programming interface based on the Promise mechanism for requesting and executing ".wasm" resources. The WebAssembly resource format is optimized to start execution without waiting for the file to fully download, which improves the responsiveness of web applications.
  • WebAssembly JavaScript Interface - provides an API for integrating with JavaScript. Allows you to get values ​​and pass parameters to WebAssembly functions. The execution of WebAssembly follows the JavaScript security model and all interaction with the main system is performed similarly to the execution of JavaScript code.

In the future, it is planned to prepare specifications for WebAssembly features such as:

  • Multithreading with shared memory and atomic memory access;
  • Vector operations based on SIMD, allowing to parallelize the execution of cycles;
  • Reference types for direct object references from WebAssembly code;
  • The ability to call functions without spending additional space on the stack;
  • Integration with ECMAScript modules - the ability to load WebAssembly code from JavaScript as modules that comply with the ECMAScript 6 specification;
  • Mode of work with the garbage collector;
  • Debugging interfaces;
  • WASI (WebAssembly System Interface) - API for direct interaction with the operating system (POSIX API for working with files, sockets, etc.).

    Source: opennet.ru

Add a comment