June 25th, 2013
There are two main use cases that asm.js addresses.
asm.js is not limited to games. The performance it can bring to web applications opens up many interesting possibilities for speeding up existing web tasks, or bringing new experiences to the Web. Efforts to port video decoders and photo processing tools using asm.js are also seeing performance increases from taking advantage of existing C++ code without plugins or browser-specific technology.
There have been several attempts to provide a solution for C++ developers wishing to target the Web. We believe asm.js is the best solution, and here are a few of our reasons why:
2. It’s fast.
3. It dramatically reduces the cost of supporting the Web.
For developers already working with C++, Emscripten makes the Web just another port target. Once it’s integrated into your tool chain, the web version can be recompiled alongside your other platforms whenever any updates are needed. We have ported full properties in very short time periods.
4. It reduces or eliminates the need for plugins.
Companies that turn to plugins to enable their games or applications often see a significant friction in user adoption due to security warnings. asm.js provides an alternative path that eliminates the security messaging issue while still providing much of the performance, all within a safe execution environment.
5. It enables reuse of existing C++ libraries.
There is a wealth of open source C++ libraries out there waiting to come over to the Web. This is a vast amount of coding effort whose value has now been unlocked for web developers.
asm.js is still a new technology, and we have plenty of work to do to provide its full potential to the developer community. Mozilla is grateful to Epic and other game industry leaders that have already started to work on products using asm.js. These early examples are helping to prove the value, shape the technology, and encourage other browsers to priorities optimizations for it. The best way to help support the development of asm.js is to start using it and let us know what you think by adding comments to this post. If you are a game developer or have a performance intensive application and choose to port it over, share your work with the world and let us know about it!
For an in-depth look into what asm.js is and isn’t, have a look at this post by Alon Zakai. Well worth the read!