emk / rust-musl-builder

Docker images for compiling static Rust binaries using musl-libc and musl-gcc, with static versions of useful C libraries. Supports openssl and diesel crates.
Apache License 2.0
1.54k stars 193 forks source link

crates.io index is updated on every build #114

Closed WesleyAC closed 3 years ago

WesleyAC commented 3 years ago

What did you try to do?

Build my project using, several times in a row, without making any changes:

docker run --rm -it -v "$(pwd)":/home/rust/src ekidd/rust-musl-builder cargo build --release

What happened?

The program built successfully, but the crates.io index was redownloaded every time, making the build slow and internet-dependent.

What did you hope to happen?

The crates.io index should be downloaded once on the first build, and only redownloaded when needed (as cargo does normally)

WesleyAC commented 3 years ago

Oh, I see that this is in the README — https://github.com/emk/rust-musl-builder#caching-builds

Sorry for the noise!