rust-cross / rust-musl-cross

Docker images for compiling static Rust binaries using musl-cross
MIT License
639 stars 70 forks source link

Enable caching #8

Closed xoac closed 2 years ago

xoac commented 6 years ago

Hi, here is a solution how to enable caching if sb is interested:

You need to just mount a registry:

-v "$(pwd)"/target/armv7-unknown-linux-musleabihf/musl-builder/cargo-cache:/root/.cargo/registry`

Full example from ~/.zshrc if you use bash you should put it to ~/.bashrc

rust-musl-builder-armv7() { docker run --rm -it -v "$(pwd)"/target/armv7-unknown-linux-musleabihf/musl-builder/cargo-cache:/root/.cargo/registry -v "$(pwd)":/home/rust/src messense/rust-musl-cross:armv7-musleabihf "$@" } 

It would be nice to add info about cache to README