Description
Problem
In the current cargo info
subcommand, its information comes from the Cargo.toml
manifest.
cargo-info includes a lot of different metrics exposed via the crates.io API (so separate from the Index and Cargo.toml)
Looking at the list, some that might be useful include
recent download count (popularity)
last updated/released (give a feel for how active development is)
authors (who maintain this package)
Proposed Solution
From #14418, we cannot directly call the API from the crates-io crate because every API from it requires the token/auth to make the API call.
A doable solution would be to add some crates.io specific API and only report these metrics when the registry is crates.io
.
Another option would be to directly call the get
function from the crates-io
crate (make it public and allow users to specify the Auth parameter) in the cargo info module and limit all specific things within that module.
Or we shouldn't do it at all, because there is no way to support it for other registries.
Notes
No response