Visual Studio Code gives a nod to the rapid rise of the Rust language — Visual Studio Magazine

News

Visual Studio Code gives a nod to the rapid rise of the Rust language

Rust, one of the fastest growing programming languages, is getting a new Visual Studio Code topic.

Announced in the latest VS Code update (the April 2022 update bringing it to v1.67), the new Rust in Visual Studio Code topic describes Rust programming language support in VS Code with the rust-analyzer extension.

The Rust Analyzer Extension
[Click on image for larger view.] The Rust Analyzer Extension (source: Microsoft).

“Rust is a powerful programming language, often used for programming systems where performance and correctness are high priorities,” reads the new topic. “If you’re new to Rust and want to learn more, The Rust Programming Language online book is a great place to start. This topic details setting up and using Rust in Visual Studio Code, with the rust extension -analyze.”

The Rust VS Code topic
[Click on image for larger view.] The Rust VS Code topic (source: Microsoft).

Specifically, the new topic covers everything from installation to a Hello World example to IntelliSense, refactoring, debugging, and more.

VS Code’s nod to Rust makes sense, as a survey conducted by the Rust community itself demonstrated the affinity between the two, as described in the 2020 article “Rust Survey: VS Code is No . 1 Editor”.

Top Editors
[Click on image for larger view.] Top Editors (source: Rust Team).

The new topic comes amid a years-long rise in Rust’s popularity. For example, Rust caused a stir in the .NET-centric developer community several years ago when we reported that “C++ memory bugs are causing Microsoft to watch Rust instead.” This article referenced Microsoft Security Response Center (MSRC) articles titled “A proactive approach to more secure code” as well as “We need a more secure systems programming language” and “Why Rust for programming safe systems”.

“We believe Rust is a game-changer for writing secure systems software,” MSRC said. “Rust provides the performance and control needed to write low-level systems, while allowing software developers to write robust and secure programs.”

There doesn’t seem to have been much progress since then in adopting Rust as a replacement for C++ for systems programming, but Microsoft, which joined the Rust Foundation last year, released documentation in February titled “Overview development on Windows with Rust”. Microsoft also led the Verona project on GitHub, described as “a research project led by Microsoft Research with academic collaborators from Imperial College London. memory management aspects of research.

Additionally, one of these 2019 MSRC posts noted that Rust topped Stack Overflow’s list of most loved languages ​​for four years in a row, and its rise continues today.

For example, Slashdata’s 22nd edition of the State of the Developer Nation report released earlier this month noted that the Rust community has nearly tripled in size in the past 24 months.

“In the previous edition of this report, we identified Rust as the fastest growing language community,” Slashdata said. “This continues to be the case at the start of 2022, with Rust nearly tripling in size over the past 24 months, growing from just 0.6 million developers in Q1 2020 to 2.2 million in Q1 2022. It also jumped from 14th to 12th place in the programming language rankings in just six months.Rust has formed a very strong community of developers who care about performance, memory safety, and security. As a result, it is mainly used in IoT software projects but also in AR/VR development, most often to implement basic low-level logic for AR/VR applications.

Nevertheless, this 12th place is still quite far down the list. The Slashdata survey indicates that Rust is most popular for AR/VR, IoT, and third-party ecosystem apps, while least popular for web and mobile:

Size of programming language communities in the first quarter of 2022
[Click on image for larger view.] Size of programming language communities in the first quarter of 2022 (source: Slashdata).

As for the rust-analyzer extension for VS Code, its features include:

  • code completion with import insertion
  • go to definition, implementation, type definition
  • find all references, find workspace symbols, change symbol name
  • hover types and documentation
  • inlay hints for parameter types and names
  • semantic syntax highlighting
  • lots of helpers (code actions)
  • apply error suggestions

It has been installed over 587,000 times, earning an average rating of 4.9 (0-5 scale) from 157 developers who have reviewed it.

“Best LSP I’ve ever used,” reads a comment from February. “Really helps with coding. And it’s now officially part of the wider Rust organization. It continues to improve every day.”

About the Author


David Ramel is an editor and writer for Converge360.



Briana R. Cross