Cross + cargo-cacher = boom

#1

I have been working with cross:

“Zero setup” cross compilation and “cross testing” of Rust crates

I also setup and used cargo-cacher:

cargo-cacher is a crates.io proxy that will proxy requests made when building a package with Cargo.

Each one of these works fine separately, however when putting them together is cross fails to find the proxy server presented by cargo-cacher.

$ cross build --target x68_64-pc-windows-gnu
  Downloaded winapi-i686-pc-windows-gnu v0.4.0 (registry `http://<my-ip:port>/index`)
error: failed to download replaced source registry `https://github.com/rust-lang/crates.io-index`

Caused by:
  failed to verify the checksum of `winapi-i686-pc-windows-gnu v0.4.0 (registry `http://<my-ip:port>/index`)`
error: couldn't generate Cargo.lock
caused by: `"cargo" "fetch" "--manifest-path" "/path/to/my/crate/Cargo.toml"` failed with exit code: Some(101)
note: run with `RUST_BACKTRACE=1` for a backtrace

This is obviously due to running cargo commands inside Docker and thus that cargo process has no access to the cacher URL presented by my host.

My main motivation here is to make my CI system faster and to put less strain on public resources.

So my questions are:

  1. Did anyone dealt with this combination before?
  2. I see that the last commit to cargo-cacher was about a year ago, is it still considered a good way to go, or did it’s functionality got superseded by cargo itself or something else?