TL;DR
Firefox 148 has disabled asm.js optimizations by default and plans to remove the code entirely in a future release. This move encourages developers to adopt WebAssembly, which offers faster execution and smaller binaries.
Mozilla has disabled asm.js optimizations by default in Firefox 148 and announced plans to remove the code entirely in a future release, marking the end of a technology that historically enabled near-native performance on the web. Learn more about the industry shift.
Starting with Firefox 148, Mozilla has turned off SpiderMonkey’s asm.js optimizations by default. The company also confirmed that the asm.js codebase will be entirely removed in a forthcoming version of Firefox. For developers maintaining sites that use asm.js, there will be no immediate breakage, as asm.js remains compatible with the JavaScript engine; it simply runs through the standard JIT compiler now.
Asm.js, a subset of JavaScript designed for high performance, was introduced by Mozilla in 2013 to enable near-native speed for web applications, particularly for game engines like Unity and Unreal. It allowed C/C++ codebases to run efficiently inside browsers, leading to significant milestones such as porting the Epic Citadel demo within days. The technology was a precursor to WebAssembly, which eventually supplanted asm.js due to its superior performance and smaller binaries.
Mozilla’s decision aligns with the widespread adoption of WebAssembly, which has become the preferred standard for high-performance web applications. The company emphasized that maintaining asm.js support incurs unnecessary maintenance costs and security risks, given its diminishing usage and the availability of WebAssembly.
Why It Matters
This development marks the final step in Mozilla’s transition away from legacy web performance technologies. By removing asm.js, Firefox reduces its attack surface and maintenance burden, while encouraging developers to adopt WebAssembly for better performance. The move underscores the industry-wide shift towards WebAssembly as the dominant solution for high-performance web applications, impacting developers and companies relying on legacy codebases.
WebAssembly development tools
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Background
Asm.js was developed by Mozilla as a response to Google’s Native Client (NaCl) and Portable Native Client (PNaCl), aiming to run code at native speeds within browsers. It debuted in Firefox 22 in 2013 and played a pivotal role in porting complex applications like 3D engines to the web. Over time, WebAssembly was introduced in Firefox 52, providing a more efficient and flexible solution for high-performance code. As WebAssembly adoption increased, asm.js usage declined, leading Mozilla to phase out support.
Mozilla’s announcement follows similar trends across the industry, where legacy technologies are phased out in favor of more modern standards. The transition reflects the maturation of web performance capabilities and the community’s preference for WebAssembly’s features and performance benefits.
“Starting with Firefox 148, asm.js optimizations are disabled by default and will be removed in a future release.”
— Mozilla Developer Blog
“Maintaining asm.js support costs us resources that are better invested in advancing WebAssembly, which provides superior performance and smaller binaries.”
— Mozilla spokesperson
JavaScript performance optimization tools
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
What Remains Unclear
It is not yet clear exactly when Mozilla will remove asm.js support entirely, as the timeline depends on the development and testing of future Firefox releases. Additionally, some legacy sites using asm.js may continue to run without issues until the feature is officially deprecated and removed.
browser JavaScript debugging tools
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
What’s Next
Developers are encouraged to migrate their asm.js codebases to WebAssembly, which offers better performance and smaller binary sizes. Mozilla will likely provide tools and guidance to facilitate this transition. The next major milestone will be the complete removal of asm.js support in an upcoming Firefox release, see how industry standards evolve.
high-performance web application development kit
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Key Questions
Will my website break if I still use asm.js?
No. Firefox 148 disables asm.js optimizations but maintains compatibility, so existing asm.js content will continue to run through the standard JavaScript engine. However, performance improvements from WebAssembly are recommended.
Why is Mozilla removing asm.js support?
Maintaining asm.js support incurs ongoing maintenance costs and security risks. WebAssembly has proven to be a more efficient, flexible, and performant standard, making it the preferred choice for high-performance web applications.
What should developers do if they use asm.js?
Developers should recompile their code to WebAssembly to benefit from faster execution and smaller binaries. Mozilla provides tools and guidance to assist with this migration.
When will asm.js be fully removed from Firefox?
The exact timeline is not yet confirmed, but removal is planned for a future Firefox release, likely within the next year.
Source: Hacker News