ktra icon indicating copy to clipboard operation
ktra copied to clipboard

Add support for sparse index by serving registry over HTTP as static file

Open fMeow opened this issue 3 years ago • 1 comments

Serving registry over HTTP as static file is a feature described in rust-lang/rfcs#2789, and the implementation rust-lang/cargo#10470 is already merged in cargo currently as unstable feature http-registry.

This PR add support for http-registry by serving index files over HTTP, and ignored hidden file to avoid leaking .git folder.

  1. add sparse_index_config in config to control HTTP registry path
    [sparse_index_config]
    path = "api/v1/crates"
    
  2. add feature gate sparse-index to enable http registry endpoint

fMeow avatar Jun 22 '22 02:06 fMeow

Were you able to test this?

Sorry for coming back to this only now. It seems the feature has been renamed sparse-registry and I'll try to review this.

Basically my main issue is that I don't know where to look for the actual expected format of the registry

gagbo avatar Feb 12 '23 12:02 gagbo