Suppose I execute cargo new one --bin
and cargo new two --bin
then add the same dependency to each project's Cargo.toml
and build them.
Now there are two absolutely identical sets of libraries:
/one/target/debug/deps/ *.rlib
/two/target/debug/deps/ *.rlib
They are same files and waste storage space, but really the problem is that I have to compile these libraries again for every project. It takes a very much time. There is the same problem with cargo install
.
Can I specify a place to store compiled libraries to avoid recompilation?