Visual Studio Code Nods to Rapidly Rising Rust Language

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

Announced in the latest update to VS Code (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 systems programming where performance and correctness are high priorities," reads the new topic. "If you are new to Rust and want to learn more, The Rust Programming Language online book is a great place to start. This topic goes into detail about setting up and using Rust within Visual Studio Code, with the rust-analyzer extension."

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 popularity. For example, Rust made a big splash in the .NET-centric developer community several years ago when we reported "C++ Memory Bugs Prompt Microsoft to Eye Rust Instead." That article referenced posts from the Microsoft Security Response Center (MSRC) titled "A proactive approach to more secure code" along with "We need a safer systems programming language" and "Why Rust for safe systems programming."

"We believe Rust changes the game when it comes to writing safe systems software," the MSRC said. "Rust provides the performance and control needed to write low-level systems, while empowering software developers to write robust, secure programs."

There doesn't seem to have been much progress since then on adopting Rust as a C++ replacement for systems programming, but Microsoft, which joined the Rust Foundation last year, posted documentation in February titled "Overview of developing on Windows with Rust." Microsoft has also spearheaded Project Verona on GitHub, described as "a research project being run by Microsoft Research with academic collaborators at Imperial College London. We are exploring research around language and runtime design for safe scalable memory management and compartmentalization. The prototype here only covers the memory management aspects of the research."

Also, one of those MSRC 2019 posts noted that Rust topped Stack Overflow's list of most loved languages for four years running, and its ascent continues today.

For example, Slashdata's 22nd edition of the State of the Developer Nation report published early 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 had identified Rust as the fastest growing language community," Slashdata said. "This continues to be the case as of the beginning of 2022, with Rust having nearly tripled in size in the past 24 months, from just 0.6M developers in Q1 2020 to 2.2M in Q1 2022. It also moved from 14th to 12th place in the ranking of programming languages 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 mostly used in IoT software projects but also in AR/VR development, most commonly for implementing the low-level core logic of AR/VR applications."

Nevertheless, that 12th place is still pretty far down the list. The Slashdata survey says Rust is most popular for augmented reality/virtual reality, IoT and apps for third-party ecosystems, while being least popular for web and mobile:

Size of Programming Language Communities in Q1 2022
[Click on image for larger view.] Size of Programming Language Communities in Q1 2022 (source: Slashdata).

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

  • code completion with imports insertion
  • go to definition, implementation, type definition
  • find all references, workspace symbol search, symbol renaming
  • types and documentation on hover
  • inlay hints for types and parameter names
  • semantic syntax highlighting
  • a lot of assists (code actions)
  • apply suggestions from errors

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

"Best LSP I ever used," reads one comment from February. "Really helps in coding. And it is now officially a part of the wider Rust organization. It keeps improving everyday."

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus


  • 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.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube