Repository navigation
Any proper way to disable auto downloads of crates #23559
|
Hi anyone reading this. Everytime after adding creates to I tried to disable I need a solution around this problem: AI agent could modify (add dependencies that's not what I want) the cargo.toml, then cargo-analyzer auto build them, which is time-consuming and takes a large disk space. Thanks for your time. Any help would be greatly appreciated. |
Replies: 3 comments 3 replies
|
The only solution is to use |
|
Instead of setting |

The only solution is to use
CARGO_NET_OFFLINEand then runcargo check(or similar command) directly when you do want to download. Not sure if this will require restarting rust-analyzer. I do not want to add another option - r-a does not really have a notion of "manual" Cargo command, and if your AI agent can write to Cargo.toml, it can probably also do other nefarious things. However if it does currently require a reload to r-a, then I do support adding a manual (cheaper) reload command.