Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull popular crates from crates.io #232

Open
NobodyXu opened this issue Sep 15, 2023 · 3 comments
Open

Pull popular crates from crates.io #232

NobodyXu opened this issue Sep 15, 2023 · 3 comments

Comments

@NobodyXu
Copy link
Member

NobodyXu commented Sep 15, 2023

Currently we uses statistics from cargo-binstall (given that the quickinstall fetcher is not disabled) and cargo-quickinstall.

Users might still experience "install from source" before the quickinstall collects the stats and build them.

We should pull popular crates from crates.io and build them proactively for better user experience.

@NobodyXu
Copy link
Member Author

NobodyXu commented Sep 15, 2023

There's a summary API which is used in crates-io-api that can be used to obtain most downloads, just updated, new crates, most recently downloaded crates.

https://docs.rs/crates_io_api/0.8.1/crates_io_api/struct.AsyncClient.html#method.summary

@NobodyXu
Copy link
Member Author

NobodyXu commented Sep 15, 2023

I also think the cronjob needs to avoid curling crates.io index too much by switching to sparse index instead.

Edit:

The sparse index is much harder to parse in bash and doing it python would require additional packages to be installed.

@NobodyXu
Copy link
Member Author

Turns out that the crates.io api only give 10 crates and they are mostly library crates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant