Rust Crates修改国内源(以中科大源为例)

$HOME/.cargo/config (默认没有这个文件,需要新建)中添加如下内容:

[source.crates-io]
replace-with = 'ustc'

[source.ustc]
registry = "git://mirrors.ustc.edu.cn/crates.io-index"

参考链接:https://mirrors.ustc.edu.cn/help/crates.io-index.html

posted @ 2022-01-30 19:19  鱼又悲  阅读(350)  评论(0编辑  收藏  举报