How to Setup Rust in VSCode?
Last Updated :
23 Jul, 2025
Rust is a memory-safe compiled programming language that delivers high-level simplicity with low-level performance. It is popular for Building systems where performance is critical like games engines databases or operating systems and it is an excellent choice when targeting web assembly. It was started as a side project of Graydon Hoare in 2007 and sponsored by Mozilla in 2009 which is syntactically the same as C++ but ensures more memory safety.
Visual Studio Code or VS Code is a source code editor, it is available for Windows, macOS, and Linux operating systems. Or we can say that it is a text editor that supports development operations and version control systems, it also provides different tools to build hassle-free code. It is available with many useful extensions for languages like C++, C#, Java, Python, PHP, Go, etc., and runtimes like .NET and Unity. VS Code provides great support with Rust. In this article, we will see how to install Rust in VS Code.
Install Rust and Visual Studio Code
To begin working with Rust in Visual Studio Code. First, we install Rust and Visual Studio Code in our system(if you already installed rust and VS Code then you can skip this step).
1. To download Rust visit the official website using any browser and then download the latest version of Rust.

To check if you have installed the right version, go to Command Prompt and type the following command:
rustc --version
2. To download Visual Studio Code in your system go to the official website of VS Code using any browser.

Configure Visual Studio Code
VS Code supports Rust very well. It contains various VS Code extensions that support Rust. To install the Rust extension in VS Code follow the following steps:
Step 1: Open Visual Studio Code.

Step 2: Go to the Extension panel and install the rust-analyzer extension by clicking on the Install button or we can use Ctrl+Shift+X.

Step 3: For Debugging support install the CodeLLdb Extension by extension menu.

Simple Rust Program
Now make a new file for example (main.rs) or any file with .rs at the end and write the first Hello World program in it. Now click on the Run button to run the code
Rust
fn main(){
println!("hello world");
}
Output:
hello World
Similar Reads
How to Install Scala with VSCode? Scala is a multi-paradigm, general-purpose, high-level programming language. It is an object-oriented programming language that also supports functional programming and it is easy to use. Its applications can be converted to bytecodes and executed on the Java Virtual Machine (JVM) (Java Virtual Mach
2 min read
How to Install Golang in VScode? GO is a compiled programming language developed by Robert Griesemer, Rob Pike, and Ken Thompson at Google. It was introduced in 2009 and is also known as golang. In this article, we are going to see how you can set up Visual Code Studio for Go language Development. We are going to install the necess
3 min read
How to Install MongoDB for VSCode? MongoDB is an open-source document-or iented database, it is a very popular NoSQL database. This database does not store data in the form of tables. It is used to store large amount of data and allows you to work with large amount of data very efficiently. It provides official drivers for multiple l
2 min read
How to Run Visual Studio on Mac? Microsoft Visual Studio was first released on 4 Dec. 1997 and the code name of this edition is called Boston. It is widely used by developers, It offers a bunch of tools to make coding easier. It is one of the best code editor software developers find. It is open-source free-to-use software. VS code
4 min read
How to Create and Setup Spring Boot Project in VSCode? Visual Studio Code (often abbreviated as VS Code) is an Integrated Development Environment (IDE) renowned for its robust support across various programming languages, including procedural, object-oriented, and hybrid languages like C, C++, Dart, Java, Python, PHP, and more. It also supports framewor
4 min read
How to Install Rust on Termux? Rust is a modern programming language known for its safety and performance. Termux is a powerful terminal emulator for Android that lets you run a Linux-like environment on your device. This article focuses on discussing the step-by-step guide to installing Rust on Termux.Table of ContentPrerequisit
3 min read