Skip to content

Commit 4870a42

Browse files
committed
Add post to call for testing of Cargo's -Zhttp-registry
1 parent 4842952 commit 4870a42

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
layout: post
3+
title: "Cargo http-registry call for testing"
4+
author: Arlo Siemsen
5+
team: The Cargo Team <https://www.rust-lang.org/governance/teams/dev-tools#cargo>
6+
---
7+
8+
The Cargo `http-registry` feature is ready for testing. The feature causes Cargo
9+
to access the crates.io index over http, rather than git. It can provide a significant
10+
performance improvement, especially if the git index is out-of-date or not yet cloned.
11+
12+
To try it out, add the `-Zhttp-registry` flag on the `nightly-2022-06-09` or newer
13+
build of Cargo. For example, to update dependencies:
14+
15+
```
16+
rustup update nightly
17+
cargo +nightly -Zhttp-registry update
18+
```
19+
20+
You can leave feedback on the [internals thread][internals].
21+
22+
Accessing the index over http allows crates.io to continue growing without hampering
23+
performance. The improvement should be especially noticeable in CI environments, where
24+
no local cache of the index exists.
25+
26+
The Cargo team plans to eventually make this the default (though the git index will
27+
remain for compatibility with older Cargo and external tools).
28+
29+
The `-Zhttp-registry` flag also enables alternative registries to be accessed over
30+
http. For more details, see the [tracking issue][issue].
31+
32+
33+
[internals]: https://internals.rust-lang.org/t/xxxxxxxxxxxxxxxxxxxxxxxxx
34+
[issue]: https://github.com/rust-lang/cargo/issues/9069

0 commit comments

Comments
 (0)