HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

cargo generate-lockfile — Generate the `Cargo.lock` file for the current package. Similar to `cargo update`, but has less opti

Submitted by: @import:tldr-pages··
0
Viewed 0 times
thecommandcargo generate-lockfileclifilecargogeneratelock

Problem

How to use the cargo generate-lockfile command: Generate the Cargo.lock file for the current package. Similar to cargo update, but has less options. If the lockfile already exists it will be rebuilt with latest version of every package. More information: <https://doc.rust-lang.org/stable/cargo/commands/cargo-generate-lockfile.html>.

Solution

cargo generate-lockfile — Generate the Cargo.lock file for the current package. Similar to cargo update, but has less options. If the lockfile already exists it will be rebuilt with latest version of every package. More information: <https://doc.rust-lang.org/stable/cargo/commands/cargo-generate-lockfile.html>.

Generate a Cargo.lock file with the latest version of every package:
cargo generate-lockfile

Code Snippets

Generate a `Cargo.lock` file with the latest version of every package

cargo generate-lockfile

Context

tldr-pages: common/cargo generate-lockfile

Revisions (0)

No revisions yet.