Skip to content

Commit

Permalink
Add post to call for testing of Cargo's -Zhttp-registry
Browse files Browse the repository at this point in the history
  • Loading branch information
arlosi committed Jun 16, 2022
1 parent 4842952 commit 4870a42
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions posts/inside-rust/2022-06-16-http-registry-testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
layout: post
title: "Cargo http-registry call for testing"
author: Arlo Siemsen
team: The Cargo Team <https://www.rust-lang.org/governance/teams/dev-tools#cargo>
---

The Cargo `http-registry` feature is ready for testing. The feature causes Cargo
to access the crates.io index over http, rather than git. It can provide a significant
performance improvement, especially if the git index is out-of-date or not yet cloned.

To try it out, add the `-Zhttp-registry` flag on the `nightly-2022-06-09` or newer
build of Cargo. For example, to update dependencies:

```
rustup update nightly
cargo +nightly -Zhttp-registry update
```

You can leave feedback on the [internals thread][internals].

Accessing the index over http allows crates.io to continue growing without hampering
performance. The improvement should be especially noticeable in CI environments, where
no local cache of the index exists.

The Cargo team plans to eventually make this the default (though the git index will
remain for compatibility with older Cargo and external tools).

The `-Zhttp-registry` flag also enables alternative registries to be accessed over
http. For more details, see the [tracking issue][issue].


[internals]: https://internals.rust-lang.org/t/xxxxxxxxxxxxxxxxxxxxxxxxx
[issue]: https://github.com/rust-lang/cargo/issues/9069

0 comments on commit 4870a42

Please sign in to comment.