A problem about cargo build

At present, when I use ESP IDF for development, I find that every time I cargo build, it will clear the program in my embuild directory, and then download the last version from GitHub again. The question I want to ask is

As far as cargo is concerned, it should only compile each current crates, and should not clear the program in the directory I specified.

Can I understand that it is the function of the source code of this crate? not caused by cargo.

My English is not very good, so I'm sorry that some of the content is incorrect

Correct. Cargo always caches git repositories in your ~/.cargo/git/checkouts/ directory and won't try to re-download every time you run cargo build.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.