panamax-rs/panamax

Feature request: Add support for sparse registry

Christiaan676 opened this issue · 4 comments

An update for cargo is in the works to make downloading of the index smaller and faster. This is especial important for CI jobs. It would be nice, if Panamax could support this.

Rust blog post: https://blog.rust-lang.org/2022/06/22/sparse-registry-testing.html
Tracking issue: rust-lang/cargo#9069

I have a small project to download a small portion of crates.io, meant to be used with the new sparse register feature. Panamax should need only a small addition for this, since the new version just needs http.

https://github.com/wcampbell0x2a/zerus

k3d3 commented

I'm very interested in having sparse registry support in Panamax! Like @wcampbell0x2a mentioned, I'm hoping there shouldn't be too much more than to just expose the crates.io-index directory via HTTP.

@wcampbell0x2a @k3d3
Yes, agree. Looking at the RFC, Etag or If-Modified-Since header support might be needed as well.

k3d3 commented

Now implemented in the panamax serve command as of v1.0.10. The sparse index is now exposed at /index/.

That means if your previous registry line in .cargo/config was:

registry = https://panamax.internal/git/crates.io.index

You will be able to use the sparse index by changing it to:

registry = sparse+https://panamax.internal/index/

I've also updated the panamax serve homepage to reflect this new URL.