As recommended by the official HP, the following command downloads Rustup, toolchain manager, and then installs Rust, compiler.
curl https://sh.rustup.rs -sSf | sh
Then, the terminal asks to select which installation of the followings:
1) Proceed with installation (default) 2) Customize installation 3) Cancel installation
To use Rust, we need to add Cargo's bin directory to PATH and it's done by the following command:
source ~/.cargo/env
Once done, we can check the installed version as follows:
% rustc --version rustc 1.45.2 (d3fb005a3 2020-07-31) % rustup --version rustup 1.22.1 (b01adbbc3 2020-07-08) % cargo --version cargo 1.45.1 (f242df6ed 2020-07-22)