1
2
3
4
5
6
7
8
9
10
11
12
| # 安装rustup, rustc, cargo
curl https://sh.rustup.rs -sSf | sh
# 安装源码, rls
rustup component add rust-src rls
# 启用国内rustup 清华镜像(bash)
echo 'export RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup' >> ~/.bash_profile
# 启用国内rustup 清华镜像(fish)
echo 'set -x RUSTUP_DIST_SERVER https://mirrors.tuna.tsinghua.edu.cn/rustup' >> ~/.config/fish/config.fish
# 切换nightly版
rustup override set nightly
# 切换stable版
rustup override set stable
|