cargo-*: update page (#11327)

This commit is contained in:
Lena
2023-10-29 09:54:53 +01:00
committed by GitHub
parent 28a74a924c
commit 158b891e0f
14 changed files with 56 additions and 150 deletions

View File

@@ -1,25 +1,9 @@
# cargo generate-lockfile
> Generates the `Cargo.lock` file for the current package.
> 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`
- 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`