ktra
ktra copied to clipboard
Add support for sparse index by serving registry over HTTP as static file
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.
- add
sparse_index_configin config to control HTTP registry path[sparse_index_config] path = "api/v1/crates" - add feature gate
sparse-indexto enable http registry endpoint
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