]> git.proxmox.com Git - cargo.git/commitdiff
Auto merge of #10470 - arlosi:http, r=Eh2406
authorbors <bors@rust-lang.org>
Thu, 24 Mar 2022 22:28:19 +0000 (22:28 +0000)
committerbors <bors@rust-lang.org>
Thu, 24 Mar 2022 22:28:19 +0000 (22:28 +0000)
HTTP registry implementation

Implement HTTP registry support described in [RFC 2789](https://github.com/rust-lang/rfcs/pull/2789).

Adds a new unstable flag `-Z http-registry` which allows cargo to interact with remote registries served over http rather than git. These registries can be identified by urls starting with `sparse+http://` or `sparse+https://`.

When fetching index metadata over http, cargo only downloads the metadata for needed crates, which can save significant time and bandwidth over git.

The format of the http index is identical to a checkout of a git-based index.

This change is based on `@jonhoo's` PR #8890.

cc `@Eh2406`

Remaining items:
- [x] Performance measurements
- [x] Make unstable only
- [x] Investigate unification of download system. Probably best done in separate change.
- [x] Unify registry tests (code duplication in `http_registry.rs`)
- [x] Use existing on-disk cache, rather than adding a new one.


Trivial merge