Rust is still a Wasm workhorse

Produced | OSC Open Source Community (ID: oschina2013)

The latest “The State of WebAssembly 2022” survey report has been released, “It’s been a pretty good year for WebAssembly”. Some highlights of the report include:

  • Rust usage and desire continue to climb
  • Python usage has grown significantly
  • JavaScript has become a viable WebAssembly language
  • Blazor usage and cravings have also surged
  • Wasmtime is the most widely used runtime
  • The use of WebAssembly for serverless, containerization, and as a plugin host has skyrocketed
  • Respondents said they are already using WebAssembly more frequently
  • Non-browser API is most needed by WebAssembly

Specifically, when asked “what language they use, or have they tried developing with WebAssembly,” 45% of respondents said they use Rust often or sometimes; in last year’s survey, Rust topped the list. The report states that WebAssembly and Rust do have a fairly close relationship, with most WebAssembly runtimes written in Rust, as are various wasm-based platforms. It also has some of the best tools out there, so this result is not surprising.

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

67% of respondents reported using WebAssembly regularly, up from 47% last year.

As the chart above shows, Rust usage climbed steadily, but the biggest climbers were Blazor and Python; AssemblyScript usage dropped the most. The researchers wondered if some respondents mistakenly identified AssemblyScript as JavaScript?

Unsurprisingly, the language respondents said they would most like to use for WebAssembly development is also Rust. Rust has seen a slight uptick in popularity compared to last year, but it’s Blazor that stands out, with Go a close second. Overall, Blazor has a good momentum in 2022.

Most people use WebAssembly for web development, followed by serverless. Comparing this year’s results with last year’s results: WebAssembly usage in serverless and containerization has risen, but the biggest growth has been in the use of WebAssembly as a plugin environment; WebAssembly usage in games has declined.

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

The text and pictures in this article are from the OSC open source community

loading.gif

This article is reprinted from https://www.techug.com/post/rust-is-still-the-main-force-of-wasm0c1bddc64ef3baca340e/
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment