قالب وردپرس درنا توس
Home https://server7.kproxy.com/servlet/redirect.srv/sruj/smyrwpoii/p2/ Technology https://server7.kproxy.com/servlet/redirect.srv/sruj/smyrwpoii/p2/ The ByteCode alliance wants to bring binary applications to your browser

The ByteCode alliance wants to bring binary applications to your browser



In 2015, a consortium including Google, Microsoft, Mozilla and the WebKit project announced WebAssembly. This week Mozilla, Intel, Red hat and quickly announced a new consortium called Bytecode Alliance, which aims to promote WebAssembly and other "new software basics" that will allow secure, default methods to run unreliable code, inside or outside the environment on web browser.

For many, this begs the obvious question: what is WebAssembly? WebAssembly (wasm) was and is a potentially exciting project, offering a way to run native browser bytecode for a potentially very large productivity boost over Javascript engines, used both then and today.

Javascript is often misunderstood as a script language that is interpreted at runtime. Although usually loaded into the browser as source code, it can be interpreted or compiled for byte code and executed. Compilation means higher performance ̵

1; especially in tight circuits – but it also means a startup penalty for the time required to perform the JIT compilation itself.

There is actually a lot more under the hood with Javascript JIT – including various modes of compilation, specialization, optimization and rescue. Mozilla's Clark Clark wrote an excellent, readable explanation for hacks.mozilla.org if you want more details.

In an effort to remove this penalty for compilation from JIT, Mozilla introduced asm.js, a specialized subset of Javascript that is most commonly used as a source-to-source compilation target for more difficult programming languages, such as C. AC languages ​​are compiled to asm.js and run as Ahead Of Time (AOT), the compiled part of the bytecode will (according to Mozilla) typically be within 50% or better of the fully native C code compiled with Clang.

The remaining problem with asm.js is that as a subset of Javascript you cannot perform operations or express data in ways that you could not in Javascript. WebAssembly proposes to change this, with native support for 64-bit integers, offsetting loading and storage, and direct access to processor instructions often used for specific tasks such as cryptanalysis.

  Google Labs Squoosh.app uses WebAssembly to enable you to play with image storage and compression techniques; delete the bar from left to right to see the difference between the original and the compressed versions in real time.
Enlarge / Google Labs Squoosh.app uses WebAssembly to allow you to play with image storage and compression techniques; delete the bar from left to right to see the difference between the original and the compressed version in real time.

Jim Salter

Unfortunately, it hasn't become very visible in the 2015 WebAssembly project. Even today, it's hard to find a specific example of what WebAssembly can do – support in different browsers is at its best it is doubtful and difficult to even find functional demonstrations that can be performed locally in the toolbox. The most affordable demo we can find is the Google Lab Squash, a simple application that lets you play with different algorithms for storing and compressing images in real time.

The potential impact of WebAssembly and the WebAssembly system interface extends far beyond the browser. Bytecode Alliance provides a platform that can be used not only to run native speed code in browsers, but overall to facilitate the re-use of unreliable code across multiple platforms, including server, edge, mobile and IoT devices . [19659012] Leaf image by Petrovsky Vladislav


Source link