Experimental ThinScript language backs WebAssembly

30.03.2016
WebAssembly, the highly touted portable bytecode format under development as a mechanism for boosting the Web's performance, is getting support in an experimental new programming language.

The low-level language ThinScript compiles to both WebAssembly and JavaScript, which is already a staple in browsers. "It's meant to be a thin layer on top of WebAssembly that makes it easier to work with: no dependencies and fast compile times," a description on GitHub states. "The syntax is inspired by TypeScript and the compiler is open source and bootstrapped (it can compile itself)." But the project is not meant for real use yet, according to the description. The GitHub repo is attributed to Evan Wallace, a developer in San Francisco.

WebAssembly is being developed under a partnership that involves major browser vendors Apple, Google, Microsoft, and Mozilla. It features a portable code format intended to run at native speeds in browsers, where it is being previewed.

While WebAssembly does not displace JavaScript, the intent is to eventually make other languages the equivalent of JavaScript in the browser, said JavaScript founder Brendan Eich, a proponent of WebAssembly. "Over the long run, that's a goal," he said. "The languages that it supports at first are C and C++, ones used for games, and similar languages." Afterward, support will be extended to languages close to C and C++ in terms of their low-level performance model and memory management. Eventually support will be developed for garbage collection languages such as Python, Ruby, Go, and various Lisps, Eich said.

With ThinScript, developers gain a language that accommodates WebAssembly right from the start. But documentation for ThinScript emphasizes that WebAssembly is still "a volatile work in progress," with the binary format set to be changed before its final release. "Debugging support for WebAssembly is non-existent in current implementations. You get the idea."

A demo of the ThinScript compiler is available.

(www.infoworld.com)

Paul Krill

Zur Startseite