Cargo 依赖下载慢、设置镜像

时间:2021-02-01 11:41:55   收藏:0   阅读:0

在用户目录.cargo目录新建config文件,把以下配置复制到文件中

[source.crates-io]
registry = "https://github.com/rust-lang/crates.io-index"
replace-with = ‘ustc‘
[source.ustc]
# registry = "git://mirrors.ustc.edu.cn/crates.io-index"
# 如果所处的环境中不允许使用 git 协议,可以把上面的地址改为
registry = "https://mirrors.ustc.edu.cn/crates.io-index"

参考:https://zhuanlan.zhihu.com/p/74875840?from_voters_page=true

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!