rust换源

$HOME/.cargo/目录下建一个config文件。windows默认是C:\Users\user_name\.cargo

config文件输入:

config 复制代码
[source.crates-io]
registry = "https://github.com/rust-lang/crates.io-index"
# 使用 replace-with指明默认源更换为'ustc'源
replace-with = 'ustc'

# `source` 就是存储有关要更换的来源名称
[source.ustc] # 定义了一个名为'ustc'的源
registry = "git://mirrors.ustc.edu.cn/crates.io-index"

之后第一次用新源会进行更新替代,时间大概大概是几十秒到几分钟左右。

Rust编程之给cargo替换国内源_cargo换源_没刮胡子的博客-CSDN博客(https://blog.csdn.net/somken/article/details/129145764?ops_request_misc={"request_id"%3A"169373099616800182723958"%2C"scm"%3A"20140713.130102334..."}\&request_id=169373099616800182723958\&biz_id=0\&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend\~default-1-129145764-null-null.142^v93^insert_down1\&utm_term=rust 换源&spm=1018.2226.3001.4187)

相关推荐
weixin_440730503 分钟前
python+request实现接口-小结
开发语言·python
不能放弃治疗5 分钟前
上下文压缩机制
后端
QQ_21696290968 分钟前
【项目编号:project95315】SpringBoot公共自习室管理系统:座位预约、房间管理、签到核销、公告规则完整实战
java·spring boot·后端
凤山老林13 分钟前
高可用服务容错架构:Spring Boot 集成 Resilience4j 实战指南
spring boot·后端·架构·resilience4j
ZJU_统一阿萨姆27 分钟前
【算子开发】扫描(Scan)与前缀和
开发语言·arm开发·架构·系统架构·硬件架构
-凌凌漆-28 分钟前
【C语言】结构体typedef struct与struct的区别
c语言·开发语言
手握风云-29 分钟前
Spring Cloud:分布式系统的“粘合剂”(五)
后端·spring·spring cloud
早点睡97531 分钟前
Python 上下文管理器深度剖析:从 with 语法糖到 CPython 底层协议
后端·面试
Cache技术分享34 分钟前
503. Java 反射 - 编写 ServiceFactory 类
前端·后端
高频因子挖掘机35 分钟前
QuantDash 成交量单位统一实战:从“手”到“股”的跨市场量化数据清洗全流程
后端·算法·github