mirror of
https://github.com/tuna/mirror-web.git
synced 2025-12-25 20:32:46 +00:00
help: crates.io-index: add help on sparse index
This commit is contained in:
parent
7b54d52f54
commit
70fe609d21
|
|
@ -17,3 +17,5 @@ registry = "https://{{ site.hostname }}/git/crates.io-index.git"
|
|||
```
|
||||
|
||||
该镜像可加快 cargo 读取软件包索引的速度。
|
||||
|
||||
在可能的情况下推荐使用 [Rust crates.io 稀疏索引镜像](/help/crates.io-index/)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: crates.io-index
|
||||
---
|
||||
|
||||
## Rust crates.io 稀疏索引镜像使用帮助
|
||||
|
||||
编辑 `~/.cargo/config` 文件,添加以下内容:
|
||||
|
||||
```
|
||||
[source.crates-io]
|
||||
replace-with = 'tuna'
|
||||
|
||||
[source.tuna]
|
||||
registry = "sparse+https://{{ site.hostname }}/crates.io-index/"
|
||||
```
|
||||
|
||||
注:`sparse+` 表示在使用稀疏索引,链接末尾的 `/` 不能缺少。
|
||||
|
||||
截至目前,可以通过 `cargo +nightly -Z sparse-registry update` 使用稀疏索引。
|
||||
Loading…
Reference in New Issue