Rust Tools

Sources:

  1. --> How To Install Rust on Ubuntu 20.04

Install

  1. Run the command to download the rustup tool and install the latest stable version of Rust:

    1
    curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh

    Next, run the following command to add the Rust toolchain directory to the PATH environment variable:

    1
    source $HOME/.cargo/env
  2. Verify the Rust installation by requesting the version:

    1
    rustc --version
  3. Installing a Compiler

    Rust requires a linker program to join compiled outputs into one file. The GNU Compiler Collection (gcc) in the build-essential package includes a linker. If you don’t install gcc, you need to use apt to install the build-essential package.

    1. First, update the Apt package index:

      1
      sudo apt update
    2. Next, upgrade any out-of-date packages:

      1
      sudo apt upgrade
    3. When the upgrades are complete, install the build-essential package:

      1
      sudo apt install build-essential

Now rust and corresponding tools (rustup, cargo) have been installed