Apple’s WebKit joins the WebAssembly bandwagon

Apple Store
Image: IDGNS



Read More:

12 June 2017 | 0

Momentum continues to build for the WebAssembly binary format. WebKit, Apple’s open source browser engine used in Safari, now has a full implementation of WebAssembly.

The implementation supports WebAssembly on Intel x86-64 and ARM64 processors. Calling WebAsembly a “no-nonsense sidekick to JavaScript,” Apple’s Saam Barati and two colleagues, JF Bastien and Keith Miller, described WebAssembly as a low-level binary format designed to be a suitable compilation target for languages such as C++. “The WebAssembly code that the browser sees will already have undergone high-level, language-specific optimisations. This is great because it means implementations don’t have to know about how C++ or other languages are optimised,” Barati said.

With WebAssembly, the hope is that it will boost web application speeds and enable languages other than JavaScript to run in browsers. The technology also has the support of the other three major browser vendors: Google, Microsoft, and Mozilla.

But WebAssembly cannot do everything JavaScript does. It cannot, for example, access the DOM without calling into JavaScript, so it is meant to be used with JavaScript. Because WebAssembly exposes itself as a regular JavaScript object, its WebKit implementation can reuse some machinery already in WebKit, including an ECMAScript module used to implement WebAssembly. To allow sharing of modules between web workers and prepare for features such as threads, Apple’s internal representation of WebAssembly code has been made thread-safe.

Apple’s WebKit implementation of WebAssembly follows Google’s recent decision to opt for WebAssembly for running native code in the browser; as a result, Google dumped its own Portable Native Client (PNaCl) technology. The four browser makers previously had agreed on a design of the initial WebAssembly and binary format. As a result, browsers now can have WebAssembly on by default.




IDG News Service

Read More:

Comments are closed.

Back to Top ↑