腾讯云使用内网源加速Rust构建

本文最后更新于 31 天前, 如有失效请评论区留言.

接着腾讯云轻量上安装Rust编译realm说,后面找腾讯云产品沟通了一下

rust镜像仓库地址:registry = "http://rust.mirrors.tencent.com/index"
使用请参考官方文档 https://doc.rust-lang.org/cargo/index.html

编辑 ~/.cargo/config.toml

[source.crates-io]
registry = "https://github.com/rust-lang/crates.io-index"

replace-with = 'tencent'

[source.tencent]

registry = "http://rust.mirrors.tencent.com/index"

[net]

git-fetch-with-cli = true

切换源后cargo check报错需要删除缓存文件 .cargo/.package-cache

Sponsor

Like this article? $1 reward

Comments

Teacher Du ·v1 香港 Reply

这个能加快多少呢?

ysicing 👨‍💻 ·v1 Reply

@Teacher Du 怎么说呢,没配置之前基本没啥速度不知道为啥。腾讯云南京。

Teacher Du ·v1 香港 Reply

@ysicing 可能是所需镜像源在国外吧!