I'm building a Rust crate in a Docker container, and iterating on it during development. Doing COPY source .
and then RUN cargo build
updates the registry and builds the code in one go, and the registry update takes by far the most time - but of course its docker cache is lost when the source changes.
Is there a cargo command I missed that will just checkout/update the crates.io registry? Creating an empty project, adding some dependency and calling cargo update
is kind of cumbersome.