MirrorZ Help

Rust crates.io 索引镜像使用帮助

选择镜像

编辑 $CARGO_HOME/config 文件,添加以下内容:

[source.crates-io]
replace-with = 'mirror'

[source.mirror]
registry = "https://(Loading...)"

注:$CARGO_HOME:在 Windows 系统默认为:%USERPROFILE%\.cargo,在类 Unix 系统默认为:$HOME/.cargo

在 Linux 环境可以使用下面的命令完成:

mkdir -vp ${CARGO_HOME:-$HOME/.cargo}

cat << EOF | tee -a ${CARGO_HOME:-$HOME/.cargo}/config
[source.crates-io]
replace-with = 'mirror'

[source.mirror]
registry = "https://(Loading...)"
EOF

在可能的情况下推荐使用 Rust crates.io 稀疏索引镜像

这个页面的内容有问题?在 GitHub Issue 反馈

想完善这个页面?查看我们的贡献指南在 GitHub 上查看此页的源代码

本页面的全部内容在 CC BY-NC-SA 4.0 协议之条款下提供,附加条款亦可能应用。