Cargo build and run sometimes repeatedly build the same build?

⚓ Rust    📅 2025-08-07    👤 surdeus    👁️ 5      

surdeus

I have a strange issue that I can't reliably repro, but I still wanted to ask in case it's a known issue.

Most of the time when I do cargo build or cargo run repeatedly without changing any Rust code it reuses the previous build and command runs fast.

But sometimes my tree gets into a state where cargo build and run builds every time. E.g. I do cargo build; cargo build and the second command still takes about 10 seconds.

I can't figure out when and how this happens and it's extremely annoying, because I have a bunch of scripts that use cargo run and they take forever when my tree gets into this state.

Does this sound familiar to anyone? What could be the issue?

Thanks.

5 posts - 3 participants

Read full topic

🏷️ Rust_feed