Report crates.io metrics in cargo info
subcommand
#14438
Labels
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Command-info
S-needs-design
Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Problem
In the current
cargo info
subcommand, its information comes from theCargo.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 thecrates-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
The text was updated successfully, but these errors were encountered: