March 15, 2016 6:00 am

Previewing WebAssembly experiments in Microsoft Edge

By / Program Manager, Chakra

Last June, we announced the start of our journey towards implementing WebAssembly – a new, portable, size and load-time-efficient binary format suitable for compiling to the web. WebAssembly is a continuation of our previous efforts to support asm.js to bring a fast and safe compile target to the web. You can learn more about WebAssembly at the FAQ on GitHub.

Since then, we have been collaborating closely with Firefox, Chrome, WebKit and the community to keep the WebAssembly principles and design moving forward in the W3C Community Group. Today, we are excited to showcase an early preview of experimental WebAssembly support in an internal Microsoft Edge build with the AngryBots demo, alongside similar previews for Firefox and Chrome. Below is a video of the demo running in Microsoft Edge using the preliminary WebAssembly support in the Chakra engine.

Despite being an early implementation, the demo starts-up significantly faster than just using asm.js as the WebAssembly binaries have a smaller file size and parse more quickly than plain JavaScript that needs to be parsed in the asm.js case.

With ChakraCore now open source, we have been developing our WebAssembly implementation entirely in the open in the WebAssembly branch of our ChakraCore repo on GitHub. Under the hood, our implementation is able to reuse much of the existing asm.js infrastructure. The WebAssembly code goes through the same pipeline as the asm.js code would, after it has been parsed.

We are excited about WebAssembly’s progress across browsers and will continue to partner with Firefox, Chrome, WebKit and the community to advance the design and bring the power of WebAssembly to the web and future Microsoft Edge releases. You can follow WebAssembly design and ChakraCore’s implementation as we make progress on this technology.

Limin Zhu, Program Manager, Chakra

Join the conversation

  1. This is indeed intriguing technology and a lot of people in the .NET space have their eyes on it as it opens the possibility of running .NET applications in the browser again but this time in a compliant/interoperable manner. Can anyone comment on if anything is being done around this? There is the CIL initiative in GitHub, but that is not a MSFT effort from my understanding:

    In any case, this is great news all around and opens up so many possibilities, the least of which being able to possible leverage countless of hours and dollars of investment in .NET. 🙂 🙂 🙂

    • Thanks Michael for posting the question and information. I work for Microsoft on the Chakra engine team. I can’t speak for the entire company but for WebAssembly, the first step is C/C++. After that, C# and other languages would be great future targets for WebAssembly.

      • Awesome. Thank you Limin for engaging your users and for the information. If at all anything, we can get C#/.NET on the radar and have this be an eventual goal. Many organizations and .NET developers are having to endure the pain of building two codebases currently to fit the requirements of a web application in the market’s current climate: a NodeJS (featuring Angular/Aurelia/etc) application for the front end written in javascript, and a .NET backend application written in C# (or VB.NET/F#). These languages and codebases are at present incompatible with each other, so it is impossible to share code (and investments) between the two.

        However, as you probably know, NodeJS can be used on the backend as well, so what we’re seeing is a migration away from .NET altogether and onto NodeJS. This doesn’t affect the Edge team nearly as much, but it does affect MSFT from a mindshare/IP perspective.

        Something to be aware of. 🙂

  2. If my calculations are correct, when WebAssembly hits 88 miles per hour… you’re gonna see some serious revolution!