Hi, I noticed that cargo install
writes registry information to .crates.toml
using the git-based index format.
When I switched to USTC's crates.io-index mirror and ran:
cargo install cargo-expand --registry ustc
I noticed an interesting difference in the file format:
Current default (git index):
"cargo-expand 1.0.108 (registry+https://github.com/rust-lang/crates.io-index)" = ["cargo-expand.exe"]
With USTC mirror (sparse protocol):
"cargo-expand 1.0.108 (sparse+https://mirrors.ustc.edu.cn/crates.io-index/)" = ["cargo-expand.exe"]
I suggest changing Cargo's default behavior to use the sparse registry protocol for crates.io:
sparse+https://index.crates.io/