we recently started using rust for software running on SoC-type computers with limited storage space (usually an SD card or onboard flash). I noticed that
~/.cargo/registry/index/github.com-1ecc6299db9ec823/.git takes up half a gigabyte of space. I assume this directory contains the entire git history of github.com/rust-lang/crates.io-index. Is it possible to use cargo without keeping all of this around?
I know this could be circumvented by cross-compiling and only pushing binaries to the devices, however we build all of our other software (mostly C++) locally and would prefer not to have to restructure the entire build and deployment process.
Edit: The sparse index feature seems to have reached beta as of 2023-01-30