一键命令安装
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
环境变量
# vi ~/.bash_profile
# source ~/.bash_profile
更新
rustup update
卸载
rustup self uninstall
查看版本
rustc --version
# cargo --version
# rustup --version
设置镜像源
- export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static
- export RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup