Rust───crates 国内镜像源配置
新建一个config.txt
config.txt内容可以如下:
配置1:
[source.crates-io]
replace-with = "rustcc"
[source.rustcc]
registry = "https://code.aliyun.com/rustcc/crates.io-index.git"
配置2:
[source.crates-io]
replace-with = 'ustc'
[source.ustc]
registry = "git://mirrors.ustc.edu.cn/crates.io-index"
如果所处的环境中不允许使用 git 协议,可以把上述地址改为:
registry = "https://mirrors.ustc.edu.cn/crates.io-index"