Rust Tools
Sources:
- --> How To Install Rust on Ubuntu 20.04
Install
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
Verify the Rust installation by requesting the version:
1
rustc --version
Installing a Compiler
Rust requires a linker program to join compiled outputs into one file. The GNU Compiler Collection (
gcc
) in thebuild-essential
package includes a linker. If you don’t installgcc
, you need to useapt
to install thebuild-essential
package.First, update the Apt package index:
1
sudo apt update
Next, upgrade any out-of-date packages:
1
sudo apt upgrade
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