Create or refresh the lockfile explicitly.
Section: Dependency and feature inspection
Generate Cargo.lock
bash
bash
cargo generate-lockfileExplanation
Useful in CI or when the lockfile was deleted and you want a clean regeneration.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Dependency and feature inspection
Refresh the lockfile
Update dependencies allowed by version requirements.
Find duplicate crate versions
List repeated dependencies that may bloat builds.
Inspect activated features
Show features involved in dependency resolution.
Pin one dependency precisely
Update a selected crate to one specific version.