https://rustcc.gitbooks.io/rustprimer/content/install/rustup.html
sudo apt install curl build-essential gcc make
curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env
rustup update
rustup show
#rustup default 1.78.0 or stable
rustup default <toolchain>
rustc --version
rustup self uninstall
create file config.toml in ~/.cargo
[source.crates-io]
replace-with = 'rsproxy-sparse'
[source.rsproxy]
registry = "https://rsproxy.cn/crates.io-index"
[source.rsproxy-sparse]
registry = "sparse+https://rsproxy.cn/index/"
[registries.rsproxy]
index = "https://rsproxy.cn/crates.io-index"
[net]
git-fetch-with-cli = true