Industrial Training




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 https://www.rust-lang.org/install.html and follow the instructions for installing Rust. After following all the instructions, Rust will get installed and the screen appears:


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

$ rustc --version  

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!!!



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:


$ curl https://sh.rustup.rs -sSf | sh   

    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:

Rust is installed now. Great!  

    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:

$ source $HOME/.cargo/env  

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:


$ rustup update  

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


$ rustup self uninstall  



Hi I am Pluto.