Javatpoint Logo
Javatpoint Logo

Rust Installation

The first step is to install Rust. First of all, download Rust through rustup which is a command line tool for managing all the Rust versions and its associated tools.

Rust Installation in Windows

  • On Windows, open the link and follow the instructions for installing Rust. After following all the instructions, Rust will get installed and the screen appears:

Rust Installation
  • After installation, PATH variable of Rust automatically adds in your system PATH.
  • Open command prompt then runs the following command:

After running this command, you should see the version number, commit hash, and commit date.

If you do, it means Rust has been installed successfully. Congratulations!!!

Rust Installation

Note: Installation of visual studio with C++ tools is mandatory to run the rust program.

Rust Installation in Linux or macOS

If you are using Linux or macOS, open a terminal then use the following command:

  • The above command downloads a script and starts the installation of rustup tool. This installs the latest version of Rust. If the installation is done successfully, then the following message will appear:
  • This installation adds automatically Rust to your system path after your next login. If you want to run Rust just right away without restarting the terminal, then run the following command to your shell to add the path to your system PATH manually:

After installation, you need a linker. When you try to run your Rust program, you will get the error that a linker could not execute. It means that the linker is not installed in your system. C compilers always come up with the correct compiler. Install a C compiler. Also, some of the Rust packages depends upon the C code and will need a C compiler.

Updating & Uninstalling

Update: After you have installed your Rust through "rustup", updating to the latest version. Run the following command to update to the latest version:

Uninstall: If you want to uninstall your Rust then runs the following command from the shell:

Next TopicFirst Rust program

Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials