WebAssembly support now shipping in all major browsers

Brink

Administrator
Staff member
Local time
1:48 AM
Messages
74,885
Location
Oklahoma
While Mozilla has been preparing to launch Firefox Quantum, its fastest browser yet, some notable developments have happened with WebAssembly, the binary file format (“wasm”) that works with JavaScript to run web applications at near-native speeds.

In the past weeks, both Apple and Microsoft have shipped new versions of Safari and Edge, respectively, with support for WebAssembly. Since Mozilla Firefox and Google Chrome already support WebAssembly, that makes all four major browsers capable of running code compiled to the wasm format on the web.

“Google, Apple, and Microsoft had all committed to supporting WebAssembly in their browsers. To have that support in market today is a really exciting development,” said Luke Wagner, the Mozilla engineer who created WebAssembly’s precursor, asm.js, and spearheaded work on the WebAssembly specification.

For developers, broad client support means they can experiment with WebAssembly with assurance that most end users will be able to run super-fast wasm modules by default. Ubiquitous client support fueled the early success of asm.js. Since it is a pure subset of JavaScript, asm.js can run in any browser without modification. For instance, you can find asm.js on Facebook, where it powers popular games like Candy Crush Saga, Top Eleven, and Cloud Raiders.

A Growing Standard

What’s the big deal about WebAssembly? First, it’s on its way to becoming an industry standard. It’s a proven way to run large, complex applications on the web. And it gives web developers a number of options they’ve never had before. For instance, now you can:

  • Take advantage of the compact wasm format to transmit files quickly over the wire and load them as JavaScript modules
  • Get near-native performance without using a plug-in
  • Write code that is both performant and safe, because it executes within the browser’s security sandbox
  • Have a choice of languages besides JavaScript, using WebAssembly as a compiler target for C and C++, with additional language support to come.
How It’s Used Today

WebAssembly has caught the interest of a wide swath of technical folks, because it brings predictable performance to the web platform — something that’s been exceedingly difficult to achieve with JavaScript alone. Gaming companies were early adopters of WebAssembly and asm.js. Epic and Unitywere first to put their industrial-strength game engines on the web without rewriting the C++ code bases in JavaScript.

Today, the use cases for WebAssembly and asm.js have grown beyond online gaming. As people experiment with the process of using the WebAssembly format and its cohort, the Emscripten compiler, they’re finding ways to move increasingly sophisticated applications to the web. Things like:

“Asm.js and WebAssembly were really no-brainers for the gaming industry, because they had all this investment in massive C++ programs that they didn’t want to rewrite for the web,” Wagner said. “Now we’re seeing people using WebAssembly for all kinds of new projects. So there’s this real promise that we will someday be able to run most any application on the web and have it perform just as it would if it were running locally on your PC.”

Want to learn more about WebAssembly? Developers can find resources on MDN Web Docs and on the WebAssembly.org project site.

Interactive Tools

You can also try out WebAssembly Explorer, an online tool which allows you play around with a C/C++ compiler and understand how WebAssembly code is produced, delivered, and ultimately consumed by the browser. Another online tool, WebAssembly Fiddle, lets you write, share, and run WebAssembly code snippets in the browser. For an even deeper dive, you can inspect WebAssembly binaries to understand how WebAssembly code is encoded at a binary level.


Source: WebAssembly support now shipping in all major browsers - The Mozilla Blog
 

My Computer My Computer

At a glance

64-bit Windows 11 Pro for WorkstationsIntel i7-8700K OC'd to 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Back
Top