在编译项目时,货物会自动下载Cargo.toml中指定的要求,作为git-repository提供。
E.g。
[dependencies.piston]
git = "https://github.com/PistonDevelopers/piston"
将导致
Updating git repository 'https://github.com/PistonDevelopers/opengl_graphics'
编译时。它在哪里将这些存储库保存在我的磁盘上?我使用Windows,这会改变什么吗?
答案 0 :(得分:3)
man cargo
给出:
FILES
~/.cargo
Directory in which Cargo stores repository data. Cargo can
be instructed to use a .cargo subdirectory in a different
location by setting the CARGO_HOME environment variable.
为git grep
执行CARGO_HOME
查找https://github.com/rust-lang/cargo/blob/3533ff11c505017751d1e466685efe7084cbd96b/src/cargo/util/config.rs#L380-L384