A new “The State of WebAssembly 2022” survey is out, “It’s been a pretty good year for WebAssembly, it’s been a pretty good year”. Some highlights of the report include.

  • Rust usage and desire continues to climb
  • Python usage has increased significantly
  • JavaScript has become a viable WebAssembly language
  • Blazor has also seen a significant increase in usage and desirability
  • Wasmtime is the most widely used runtime
  • Use of WebAssembly for serverless, containerization, and as a plugin host has climbed significantly
  • Respondents say they are already using WebAssembly more frequently
  • Non-browser APIs are most needed for WebAssembly

Specifically, when asked about “languages used, or whether they have tried to develop in WebAssembly,” 45 percent of respondents said they often or sometimes use Rust; in last year’s survey, Rust topped the list. The report notes that WebAssembly and Rust do have a pretty close relationship, with most WebAssembly runtimes being written in Rust, as well as various wasm-based platforms. It also has some of the best tools available, so this result is not surprising.

In second place this year was JavaScript, compared to AssemblyScript last year, but last year’s survey did not offer a JavaScript option, and no one added that they were using it. While JavaScript cannot be compiled into WebAssembly, there is a workaround: instead of compiling JS into Wasm, you can compile the JavaScript engine into WebAssembly and then use it to execute your code. “This is actually a lot more practical than you might think.”

current WebAssembly language usage

Sixty-seven percent of respondents said they use WebAssembly regularly, a significant increase from 47 percent last year.

current WebAssembly language usage

As the chart above shows, Rust usage is steadily climbing, but the strongest climbers are Blazor and Python; AssemblyScript usage is declining the most. The researchers wonder if there are some respondents who incorrectly identify AssemblyScript as JavaScript.

As expected, the language respondents said they would most like to use for WebAssembly development was also Rust, which saw a slight increase in popularity compared to last year, but Blazor was the most prominent, with Go a close second. Overall, Blazor has good momentum for 2022.

Desired Language

Desired Language

Most people use WebAssembly for Web development, followed by serverless. Comparing this year’s results with last year’s results shows: WebAssembly use in serverless and containerization saw an uptick, but the biggest increase was in the use of WebAssembly as a plug-in environment; WebAssembly use in games saw a decline.

WebAssembly

WebAssembly

The features of most interest to respondents were Threads, Exceptions, and Garbage Collection, and the most interesting WASI (WebAssembly System Interface) proposals were I/O types, Sockets, Filesystem, and Native threads. And the report notes that the Non-browser API is the most important element needed for WebAssembly to succeed in the future. “This further underscores the interest and importance of WASI.”

WebAssembly

WebAssembly

WebAssembly

More details can be found in the full report.