How to set up Rust Development Environment

Rust

In this post, we will learn How to set up Rust Development Environment Rust is a flexible language. We have a lot of options in IDEs when it comes to Rust development. Rust plug-ins are available for most of these IDE so it is up to the developers to choose which one they want to use as per the need and the project requirements.

To work on rust programs we can choose from a number of IDEs which is available. For this tutorial I will prefer to use “Visual Studio Code” and I will be using that only.

1- Visual Studio Code


The topmost choice is the Visual studio code. This IDE has below pros when we want to use VS Code.

  • It is Open-source. You dont need a license and it is free.
  • It have the Built-in Cargo support which is the package manager of Rust.
  • It offer the Code completion feature while writing code.
  • It offers options like Jump to definition, peek definition, find all references, symbol search etc.
  • Intellisence support that helps with Types and documentation on mouse hover.
  • Code formatting.

So you can install “Visual studio code” from the Microsoft site and once your installation is completed then you will need to install rust extensions to this and then you will be able to write rust programs and compile them.

So the packages that you will need are:

  • rust rls
  • rust

In Visual Studio code, you can search the above two packages or plugins. Once you see them in the drop list just click Install and VS Code will install it for you.

These extensions will help you to gain some of the normal features also like IntelliSense, code navigation using go-to definitions, etc. Now we are ready to write our first program in VS code.

2- IntelliJ rust


IntelliJ Rust is another most used IDE for Rust language. It offers some more features like.

  • You can open multiple projects in same workspace.
  • Debugging support.

3 – Eclipse RustDT


Eclipse RustDT is another IDE that is popular among Embedded developers. This is also free and Open-source.

4 – Atom Editor


Atom editor is another IDE that is developed by Github. This is a normal text editor application. This can be used for Rust development by installing the Rust build tools. Rust atom packages can be installed for that.

5 – Sublime text 3


Sublime text editor is another IDE that can be used for Rust development. This is a normal text editor application. This can be used for Rust’s development by installing the Rust build tools. Sublime text packages can be installed for that.