Rust VSCode Setup

Posted Under: Rust, Tutorials, Windows on Sep 12, 2021
Rust VSCode Setup
Visual Studio Code (VS Code) is a free IDE by Microsoft. It support multitude of programming languages, including Rust. In order to start using VS Code for Rust programming. We need to install Rust on Windows systems. Then download latest version of VS Code. Once it is installed open it and press Ctrl + Shift + X this will open Extensions then in search bar type rust-analyzer and install this extesion. Rust VS Code extension rust-analyzer

Now, Create a Folder, let say, Rust and open Command Shell or PowerShell in this directory and type
cargo new hello_world 
This will create a rust project structure in the Rust folder.

Rust cargo directory structure

Now open VS Code then File → Open Folder and open the hell_world folder.

Rust VS Code Hello World

After the code it loaded, Click on ► Run, and the output, which in this case is Hello, world! is printed in the TERMINAL tab below.
© Tutorial Jinni