Alternative to cargo fetch
for use in CI or other "clean" environments that you want to quickly bootstrap
with the necessary crates to compile/test etc your project(s).
cargo-fetcher
only supports storing crates/git snapshots
inside of GCS which means they can be located closer to the compute resources your CI is running on. PRs are of course welcome for adding additional storage backends though!cargo-fetcher
should not be used in a typical user environment as it completely disregards various
safety mechanisms that are built into cargo, such as file-based locking.Cargo.lock
file. cargo-fetcher
only works with Cargo.lock
files (due to how cargo fetch
works), so library crates without checked in lock files won't be able to use cargo-fetcher
.This is an example from our CI for an internal project.
The following CI jobs are run in parallel, each in a Kubernetes Job running on GKE. The container base is roughly the same as the official rust:1.36.0-slim image.
~ wait for all jobs to finish ~
All 3 build jobs take around 1m2s each to do cargo fetch --target x86_64-unknown-linux-gnu
All 3 build jobs take 2-3s each to do cargo-fetcher --include-index mirror
followed by 6s to
do cargo fetch --target x86_64-unknown-linux-gnu
. The 6s can probably be further reduced.
We welcome community contributions to this project.
Please read our Contributor Guide for more information on how to get started.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.