frewsxcv / rust-crates-index

Rust library for retrieving and interacting with the crates.io index
https://docs.rs/crates-index/
Apache License 2.0
72 stars 37 forks source link

No way to acquire config with a sparse registry if it doesn't exist locally #164

Closed Nemo157 closed 6 months ago

Nemo157 commented 6 months ago

From https://github.com/Nullus157/cargo-dl/issues/26, if you have a completely empty CARGO_HOME then with SparseIndex you can lookup crate details, but there's no way to use index_config.

I think there could be a make_config_request and parse_config_response to mirror the API for updating cache entries. I'll prototype such an API and can open a PR for it.

Byron commented 6 months ago

Even though I don't think I truly understand, I think I know enough to say that a PR would definitely be nice, particularly if it contains tests that could make even clearer what's happening. Thanks in advance for the offer, a PR would be lovely.