1 背景介绍
最近在引入rust的一些依赖包的时候,拉取特别慢,于是修改一下镜像源

2 解决方案
2.1 更换源
新增文件 /.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"

2.2 删除缓存
这一步一定要做,否则更改源可能无效:.cargo/.package-cache


参考链接:https://blog.csdn.net/michael_wgy_/article/details/112540613

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-06
  • 2021-10-23
  • 2022-12-23
  • 2021-05-07
  • 2021-06-19
猜你喜欢
  • 2022-12-23
  • 2021-11-12
  • 2022-01-08
  • 2021-06-13
  • 2021-08-21
  • 2021-10-19
  • 2021-07-15
相关资源
相似解决方案