配置
Cargo 换国内源
- linux
${HOME}/.cargo 新建config文件
[source.crates-io]
registry = "https://github.com/rust-lang/crates.io-index"
#replace-with = 'tuna'
replace-with = 'ustc'
#replace-with = "rustcc"
[source.tuna]
#清华提供
registry = "https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git"
[source.sjtu]
# 上海交通大学
registry = "https://mirrors.sjtug.sjtu.edu.cn/git/crates.io-index"
[source.ustc]
# 中国科技大提供
registry = "https://mirrors.ustc.edu.cn/crates.io-index"
#registry = "git://mirrors.ustc.edu.cn/crates.io-index"
[source.rustcc]
# rust中文社区提供
registry = "https://code.aliyun.com/rustcc/crates.io-index.git"
#registry = "git://crates.rustcc.cn/crates.io-index"
[net]
git-fetch-with-cli = true