registry = "https://code.aliyun.com/rustcc/crates.io-index.git" 保存文件后,你的Crates就会开始使用Rust.cc社区提供的国内镜像了。你可以像往常一样使用cargo build、cargo run等命令,但它们现在会从国内镜像中获取包,速度会更快,连接会更稳定。 国内crates镜像的优势 使用Rust.cc社区提供的国内crates镜像,你...
ustc的镜像出了问题,建议换到TUNA的 建议config如下: [source.crates-io] registry ="https://github.com/rust-lang/crates.io-index"replace-with ='tuna' [source.tuna] registry ="https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git"#replace-with ='ustc'#[source.ustc]#registry ="git:...
一般安装 Rust 的时候就会用到镜像站,修改一下就行 RUSTUP_DIST_SERVER="https://rsproxy.cn" RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup" 在.cargo 目录下创建 config文件 添加以下内容 Rust>=1.68 [source.crates-io] replace-with = 'rsproxy-sparse' [source.rsproxy] registry = "https://rs...
2.2 覆盖默认的镜像地址 相比于新增镜像地址,我们更推荐覆盖默认的镜像地址这种方法,因为这种方法无需修改Cargo.toml文件,而是直接使用新注册服务来替代默认的crates.io。 在$HOME/.cargo/config.toml文件中添加以下内容: [source.crates-io] replace-with = 'ustc' [source.ustc] registry = "git://mirrors.ustc...
本项目源代码在这里,https://github.com/rustcc/lernaean-deploy ,由成电大佬 DCjanus 开发和部署。 本源托管服务器由 LongHash 赞助,在此表示感谢。 这个源是 Rust crates.io 专用源(这台服务器只做这一件事),不像其它那些国内源镜像是各种服务放在同一台或几台服务器上,造成不稳定的现象。
国内拉取 crates.io 仓库代码比较慢,很多次超时导致引用库没法编译,大家可通过以下配置,把源切换到国内镜像源。 创建配置文件 配置文件目录 //windows C:\Users\{操作系统当前用户名}\.cargo\ //linux or mac /Users/{操作系统当前用户名}/.cargo/
在$CARGO_HOME/config文件添加国内的镜像源 下面的镜像源来自:https://rsproxy.cn/ FROM rust:1.72 as builder WORKDIR /usr/src COPY . . RUN echo "[source.crates-io]\n\ replace-with = 'rsproxy-sparse'\n\ [source.rsproxy]\n\ registry = \"https://rsproxy.cn/crates.io-index\"\n\ [...
这个源是 Rust crates.io 专用源(这台服务器只做这一件事),不像其它那些国内源镜像是各种服务放在同一台或几台服务器上,造成不稳定的现象。 唯一的问题是,带宽有限(5M),用的人多了些,可能会相对慢点(小编实测还是很快的),但是是相当稳定的。 如果有愿意赞助的,当然也可以与小编联系。谢谢。
# 指定镜像 #replace-with = 'sjtu' replace-with = 'ustc' # 源码地址 [source.crates-io] registry = "https://github.com/rust-lang/crates.io-index" # 清华大学 [source.tuna] registry = "https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git" # 中国科学技术大学 [source.ustc] re...