Create a lockfile without building.
Section: Inspection and troubleshooting
Generate or refresh Cargo.lock
bash
bash
cargo generate-lockfileExplanation
Useful in automation or before commits when a lockfile is required.
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 Inspection and troubleshooting