Blazor Among Top Libraries for 'Niche' WebAssembly, Which Sees Shrinking Usage

While WebAssembly has made quite a splash in the web-dev world, a new report describes it as "niche" tech whose usage is actually contracting, though among that shrinking usage, Microsoft's Blazor is among the top libraries.

"Clearly WebAssembly isn't widely used, and rather than seeing a growth in usage, we are seeing a modest contraction," Colin Eberhardt said in a post this week on the Web Almanac site by HTTP Archive.

WebAssembly (or Wasm), as web developers in the Microsoft ecosystem well know, is an open source project that lets developers use its assembly-like code as a compilation target so programming languages including C# can be used for browser-based apps instead of ubiquitous JavaScript.

Or, as the Sept. 25 post says, "WebAssembly introduces a new runtime into the browser, one which works alongside, and in close collaboration, with the JavaScript runtime. It is relatively lightweight in comparison, with a small instruction set and a strict isolation model (WebAssembly has no I/O by default). One of the primary motivators for developing WebAssembly was to provide a compilation target for a wide range of programming languages (C++, Rust, Go etc.), allowing developers to write new web applications, or port existing applications, with a wider toolset."

Using complicated methodology, the report examines how widely WebAssembly is used, what it's used for, what languages are people using with it and what features are being used.

Of special interest to readers of Visual Studio Magazine is the finding that Blazor is among the top WebAssembly libraries when ranked by percentage of Wasm requests that could be attributed to it. Blazor comes in third (8.5 percent of combined desktop/mobile requests) behind Amazon IVS (34.9 percent) and Hyphenopoly (12.1 percent).

Popular WebAssembly Libraries
[Click on image for larger view.] Popular WebAssembly Libraries (source: Web Almanac).

On another scale, measuring WebAssembly language usage, Blazor is farther down the ranking, coming in at No. 5 (3.5 percent) behind LikelyEmscripten (61.1 percent), Unknown (16.9 percent), Emscripten (11.8 percent) and Rust (6 percent), and only ahead of Go (0.7 percent). Of course, Blazor is a framework, not a language. The language most likely to be used in Blazor WebAssembly projects is C#. Emscripten isn't a language either, though the compiler toolchain is associated with C++.

WebAssembly Language Usage
[Click on image for larger view.] WebAssembly Language Usage (source: Web Almanac).

Remarkably, the above results seem to stand in contrast to The State of WebAssembly 2022 report published in June, which was also written by Eberhardt (though on the site of Scott Logic, where he is CTO), as detailed in the Visual Studio Magazine article, "Blazor Posts Biggest Gain in WebAssembly Usage: Report."

Languages Used Frequently or Sometimes Compared to Last Year
[Click on image for larger view.] Languages Used Frequently or Sometimes Compared to Last Year (source: Scott Logic).
Languages Used Frequently or Sometimes Compared to Last Year
[Click on image for larger view.] Which Languages People Most Want to Use for WebAssembly Development Compared to Last Year (source: Scott Logic).

For 2022, just like Scott Logic's 2021 report, Rust was listed as the No. 1 language used with WebAssembly. "Rust once again comes out on top, with 45 percent saying they use it frequently or sometimes," Eberhardt said in June. "WebAssembly and Rust do have quite a close relationship, most WebAssembly runtimes are written in Rust, as are the various platforms based on wasm. It also enjoys some of the best tooling, so this result doesn't come as a big surprise."

The June report also said, "It's been a good year for Blazor, with a big climb in usage and desire," and, "It's been quite the year for WebAssembly!" Regarding the latter, Eberhardt's June post detailed a climb in usage for serverless computing, containerization and as a plug-in host. It also reported that survey respondents are using WebAssembly much more frequently.

The new Web Almanac report, however, paints a less optimistic picture of the new tech, which only became an officially recognized W3C standard in December 2019.

For example, Eberhardt, in addition to noting that WebAssembly isn't widely used and has actually seen a modest contraction in usage instead of growth, also said, "WebAssembly is undeniably a niche technology when it comes to the web, and there is a very good chance that it always will be. While WebAssembly has brought a wide range of languages to the web -- C++, Rust, Go, AssemblyScript, C# and more -- these cannot yet be used interchangeably with JavaScript. For the vast majority of websites, where the content is relatively static (rendered in HTML with CSS) with a modest amount of interactivity (via JavaScript) there simply isn't a compelling reason to use WebAssembly at the moment."

However, the claim that C# can't be used interchangeably with JavaScript seems to have been upended in recent Microsoft documentation about .NET JavaScript interop on WebAssembly, which says, ".NET 7 introduces a new low-level mechanism for using .NET in JavaScript-based apps," Microsoft explained. "With this new JavaScript interop capability, you can invoke .NET code from JavaScript using the .NET WebAssembly runtime as well [as] call into JavaScript functionality from .NET without any dependency on the Blazor UI component model," as detailed in the Sept. 20 VSM article, "WebAssembly Steals the ASP.NET Core Show in .NET 7 RC1."

Eberhardt's conclusions weren't all negative, though, as he further said, "Despite being a niche technology, WebAssembly is already adding value to the web. There are a number of web applications that benefit greatly from this technology. However, web applications are often not visible to the 'crawl' which forms the basis of this study.

"Finally, the core features of the WebAssembly runtime -- multi-language, lightweight, secure -- are making it a popular choice for a wider range of non-browser applications. The State of WebAssembly 2022 survey saw a significant increase in the number of people using this technology for serverless, containerization and plug-in applications. The future of WebAssembly could be as a niche web technology, but as an entirely mainstream runtime on a wide range of other platforms."

The WebAssembly data is but one part of the sprawling HTTP Archive's annual state of the web report.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus


  • Creating Reactive Applications in .NET

    In modern applications, data is being retrieved in asynchronous, real-time streams, as traditional pull requests where the clients asks for data from the server are becoming a thing of the past.

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

Subscribe on YouTube