cargo-bins / cargo-quickinstall

pre-compiled binary packages for `cargo install`
Apache License 2.0
213 stars 9 forks source link

Pull popular crates from crates.io #232

Open NobodyXu opened 10 months ago

NobodyXu commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

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