From 6dce51165cf7180bf1fc97e3a5e4e6dcb9554a00 Mon Sep 17 00:00:00 2001 From: Pranav Kale Date: Wed, 11 Oct 2023 15:47:27 +0530 Subject: [PATCH] cargo-generate-lockfile: add page (#10918) * cargo-generate-lockfile: add page * cargo-generate-lockfile: add page * cargo-generate-lockfile: add page * cargo-generate-lockfile: add page * Update pages/common/cargo-generate-lockfile.md Co-authored-by: K.B.Dharun Krishna * Update pages/common/cargo-generate-lockfile.md Co-authored-by: K.B.Dharun Krishna * Update pages/common/cargo-generate-lockfile.md Co-authored-by: K.B.Dharun Krishna * Update pages/common/cargo-generate-lockfile.md Co-authored-by: K.B.Dharun Krishna * Update pages/common/cargo-generate-lockfile.md Co-authored-by: K.B.Dharun Krishna * Update pages/common/cargo-generate-lockfile.md Co-authored-by: K.B.Dharun Krishna * Update pages/common/cargo-generate-lockfile.md Co-authored-by: Juri Dispan * Update pages/common/cargo-generate-lockfile.md Co-authored-by: Juri Dispan --------- Co-authored-by: K.B.Dharun Krishna Co-authored-by: Juri Dispan --- pages/common/cargo-generate-lockfile.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 pages/common/cargo-generate-lockfile.md diff --git a/pages/common/cargo-generate-lockfile.md b/pages/common/cargo-generate-lockfile.md new file mode 100644 index 0000000000..7258a060fc --- /dev/null +++ b/pages/common/cargo-generate-lockfile.md @@ -0,0 +1,25 @@ +# cargo generate-lockfile + +> Generates the `Cargo.lock` file for the current package. +> If the lockfile already exists it will be rebuilt with latest version of every package. +> More information: . + +- Generate a `Cargo.lock` file with the latest version of every package: + +`cargo generate-lockfile` + +- Specify a custom path for the `Cargo.toml` file (Note: By default the file is present in the current directory): + +`cargo generate-lockfile --manifest-path {{path/to/file.toml}}` + +- Assert that the `Cargo.lock` file is up-to-date: + +`cargo generate-lockfile --locked` + +- Prevent Cargo from attempting to access the network to determine if it out-of-date: + +`cargo generate-lockfile --frozen` + +- Prevent Cargo from accessing the network. (Note: If Cargo requires internet to proceed and network is not available, it will stop with an error): + +`cargo generate-lockfile --offline`