I’m currently working to make Rust production ready at work on top of cargo but there are some definite pain points. The main one I’m running up against is having build boxes without internet access. Even if they did we wouldn’t want to depend on crates.io for production builds+deployments.
It’s easy enough to mirror the crates.io-index repo and also have a mirror for the package files but the architecture adds some complication. The fact that the dl url has to be specified as part of the index’s config.json means that I have to keep an internal fork of the crates.io-index just to modify the config.json and worry about future merge conflicts if/when something in that file changes.
I would love to see the ability to override the index’s dl url from the .cargo/config as this would simplify basic mirroring. I haven’t had the need to override api yet so I can’t say if there’d be value in allowing an option to override the index for that as well but it might be useful to others.
Edit: Opened issue on the cargo repo here: https://github.com/rust-lang/cargo/issues/1923