WebAssembly, the binary format positioned to speed up the performance of web applications, is getting more full-featured, with plans proceeding to improve its programming language support via garbage collection. Threads, better debugging, and a SIMD (single instruction multiple data) extension also are on the agenda.
To support use of multiple languages with WebAssembly, garbage collection is needed to efficiently allocate and manipulate managed objects from WebAssembly code, said Deepti Gandluri, a Google Chrome software engineer on the WebAssembly team. Garbage collection currently is in the proposal stage.
A trial version of threads, meanwhile, is due by the end of the year, with the general release to be launched in the first half of 2018, Gandluri said. Threads, providing accommodations for shared memory and concurrency, will simplify the porting of multithreaded applications to the web, and lay the groundwork for faster-running applications.
To improve debugging, the WebAssembly developers are working on capabilities for source maps and memory inspection. WebAssembly currently offers basic debugging capabilities. With the SIMD extension, WebAssembly would gain support for instructions used in image and video processing and cryptography. Also on the roadmap is “zero-cost” exception-handling for C/C++ to eliminate overhead.
WebAssembly is not just for desktop browsers, Danilo said. It is being supported in Safari on iOS 11 and in Chrome on the Android platform. Support for WebAssembly in mobile browsers will enable the development of applications using native code for mobile devices, providing faster execution time and reduced battery usage. Development of WebAssembly has been a cooperative effort among the major browser makers including Apple, Google, Microsoft, and Mozilla.