Rust Cargo update crate.io index 时无响应
Rust 大约 468 字现象
在IDEA
中添加Rust
的Cargo
应用时,一直卡在update xxx index
阶段,非常耗时。
尝试解决
试过使用mirror
,但仍然无效。
解决方法
对于没有外部依赖的项目,可以配置net.offline
为true
,也可以在cargo run
时指定--offline
。
新建~/.cargo/config
配置。
完整配置:(无需添加镜像,只需指定[net] offline
即可)
[net]
offline = true
[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"
更多配置
https://doc.rust-lang.org/cargo/reference/config.html#configuration-format
阅读 94 · 发布于 2023-04-30
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb扫描下方二维码关注公众号和小程序↓↓↓

昵称:
随便看看
换一批
-
Spring Boot 配置文件中读取变量的优先级阅读 246
-
Java jdbc 批处理 rewriteBatchedStatements=true阅读 2821
-
Java 语法糖 - switch 匹配字符串阅读 1813
-
Kubernetes 数据存储 EmptyDir阅读 891
-
Angular 相关知识点阅读 459
-
软考-系统架构设计师:网络规划、设计与实施阅读 2199
-
CSS absolute 绝对定位布局在 Android 系统软键盘弹出时被顶起阅读 1568
-
Jenkins 一直卡在 Setup Wizard 界面解决办法阅读 898
-
前端 Chrome 反调试方法阅读 4530
-
Vue $refs 操作 DOM 元素阅读 373