Rust
安装
MacOS
安装
bash
# Install Toolchain Manager
brew install rustup
# Install Rust Compiler
rustup-init
#
source ~/.zshrc
# Verify Your Installation
rustc --version
镜像
bash
touch ~/.cargo/config.toml
bash
[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
~/.zshrc or ~/.bashrc
bash
export RUSTUP_DIST_SERVER="https://rsproxy.cn"
export RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup"