News

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 at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube