Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 1.46 KB

README.md

File metadata and controls

27 lines (17 loc) · 1.46 KB

Rust Docker CI

Dockerhub Badge Github Badge

This is an image created to minimize Gitlab CI build/test times for rust projects by caching the tools previously installed during the CI process.

Included Tools

  • LLD and Clang for faster linking
  • Clippy for linting
  • rustfmt for formatting
  • cargo-tarpaulin for code coverage
  • cargo-audit to check for known vulnerabilities

Image Size

The rust:latest image on which this is built is already quite large, 1.39GB at time of writing. These additions bring the image size up to 2.25GB, which seems like too much space for just these tools.

I've not looked at exactly how much there is to save but I can't imagine these tools add up to nearly a gigabyte. My suspicion is that intermediate build files may account for this, though I don't know where those files are. Changing cargo install --target-dir to a known directory and then deleting that directory didn't substantially change the image size. I suspect there's a similar compilation step for rustup component add with shared dependencies to the cargo installed tools, but I don't know where that is located.

Alternatively, these tools could just be that big.