-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
cargo install
should download binaries from crate.io if a compatible dependency/feature-set is availible
#13994
Comments
Since the "cargo install" only installed tools used by local env, download these tools is lots of faster than build them locally. |
An important first step in consideration is #7169 as we would effectively be locking in the lockfile otherwise. We also have #5931 which would help some but not too much until the follow up idea of a remote cache support and then that could be a potential way of solving this problem. There is also the question of what the role of In terms of third-party efforts in this direction, see https://crates.io/crates/cargo-binstall |
Thank you so much for your fast reply and help. |
cargo install
should download binaries from crate.io if a compatible dependency/feature-set is availible
We discussed this further in today's Cargo team meeting. While some ecosystems have maintainer-built binaries, that doesn't quite work for Rust
For some of those ecosystems, its more acceptable out of necessity because of how few of their users have a toolchain for building native packages.
This is where the per user caching comes in. That initially would be local only and intermediate-artifacts only. If/when we expand to remote caches, we could also add support for final artifacts. crates.io could then have a build system, like docs.rs, with suggested build configurations specified in So this is blocked on
This issue would then be tracking
Be warned that this is a many years effort. As such, we had considered closing this as postponed due to how far out this is (and it being unknown how much might change before then) but we are keeping this for now as a central focus for these discussions. |
Problem
"Cargo install" should provide download binaries only from crate.io if availibale rather than build these binaries every time when calling cargo install. since the build process in local computer is very slow, especially when call "cargo install" when build a docker containers.
Proposed Solution
provide "cargo install --no-locall-build" or "cargo install --download_binaries_only"
Notes
No response
The text was updated successfully, but these errors were encountered: