Hacker News new | past | comments | ask | show | jobs | submit login

On unstable there's the "-Z no-index-update" flag which "ensures that Cargo does not attempt to update the registry index. (...) to avoid the network latency for updating the index each time"

https://doc.rust-lang.org/nightly/cargo/reference/unstable.h...




Following stable options are often more then enough:

`--locked` might not prevent index updates, but prevent any changes in used code, i.e. only what is in the lockfile will be used

`--frozen` like locked but also requires the (download?) cache to be up to date

`--offline` prevent index updates and downloads

So if you have everything in the download cache `--offline` is like `-Z no-index-update` and `--locked` is most times good enough because since partial indices where added the index updates don't consume much time at all.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: