fork/cargo
git clone https://git.julia.blue/fork/cargo
88957a1b7
0.91.0
1CARGO-GENERATE-LOCKFILE(1) 2 3NAME 4 cargo-generate-lockfile — Generate the lockfile for a package 5 6SYNOPSIS 7 cargo generate-lockfile [options] 8 9DESCRIPTION 10 This command will create the Cargo.lock lockfile for the current package 11 or workspace. If the lockfile already exists, it will be rebuilt with 12 the latest available version of every package. 13 14 See also cargo-update(1) which is also capable of creating a Cargo.lock 15 lockfile and has more options for controlling update behavior. 16 17OPTIONS 18 Display Options 19 -v, --verbose 20 Use verbose output. May be specified twice for “very verbose” 21 output which includes extra output such as dependency warnings and 22 build script output. May also be specified with the term.verbose 23 config value 24 <https://doc.rust-lang.org/cargo/reference/config.html>. 25 26 -q, --quiet 27 Do not print cargo log messages. May also be specified with the 28 term.quiet config value 29 <https://doc.rust-lang.org/cargo/reference/config.html>. 30 31 --color when 32 Control when colored output is used. Valid values: 33 34 o auto (default): Automatically detect if color support is 35 available on the terminal. 36 37 o always: Always display colors. 38 39 o never: Never display colors. 40 41 May also be specified with the term.color config value 42 <https://doc.rust-lang.org/cargo/reference/config.html>. 43 44 Manifest Options 45 --manifest-path path 46 Path to the Cargo.toml file. By default, Cargo searches for the 47 Cargo.toml file in the current directory or any parent directory. 48 49 --ignore-rust-version 50 Ignore rust-version specification in packages. 51 52 --locked 53 Asserts that the exact same dependencies and versions are used as 54 when the existing Cargo.lock file was originally generated. Cargo 55 will exit with an error when either of the following scenarios 56 arises: 57 58 o The lock file is missing. 59 60 o Cargo attempted to change the lock file due to a different 61 dependency resolution. 62 63 It may be used in environments where deterministic builds are 64 desired, such as in CI pipelines. 65 66 --offline 67 Prevents Cargo from accessing the network for any reason. Without 68 this flag, Cargo will stop with an error if it needs to access the 69 network and the network is not available. With this flag, Cargo will 70 attempt to proceed without the network if possible. 71 72 Beware that this may result in different dependency resolution than 73 online mode. Cargo will restrict itself to crates that are 74 downloaded locally, even if there might be a newer version as 75 indicated in the local copy of the index. See the cargo-fetch(1) 76 command to download dependencies before going offline. 77 78 May also be specified with the net.offline config value 79 <https://doc.rust-lang.org/cargo/reference/config.html>. 80 81 --frozen 82 Equivalent to specifying both --locked and --offline. 83 84 --lockfile-path PATH 85 Changes the path of the lockfile from the default 86 (<workspace_root>/Cargo.lock) to PATH. PATH must end with Cargo.lock 87 (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that 88 providing --lockfile-path will ignore existing lockfile at the 89 default path, and instead will either use the lockfile from PATH, or 90 write a new lockfile into the provided PATH if it doesn’t exist. 91 This flag can be used to run most commands in read-only directories, 92 writing lockfile into the provided PATH. 93 94 This option is only available on the nightly channel 95 <https://doc.rust-lang.org/book/appendix-07-nightly-rust.html> and 96 requires the -Z unstable-options flag to enable (see #14421 97 <https://github.com/rust-lang/cargo/issues/14421>). 98 99 Common Options 100 +toolchain 101 If Cargo has been installed with rustup, and the first argument to 102 cargo begins with +, it will be interpreted as a rustup toolchain 103 name (such as +stable or +nightly). See the rustup documentation 104 <https://rust-lang.github.io/rustup/overrides.html> for more 105 information about how toolchain overrides work. 106 107 --config KEY=VALUE or PATH 108 Overrides a Cargo configuration value. The argument should be in 109 TOML syntax of KEY=VALUE, or provided as a path to an extra 110 configuration file. This flag may be specified multiple times. See 111 the command-line overrides section 112 <https://doc.rust-lang.org/cargo/reference/config.html#command-line-overrides> 113 for more information. 114 115 -C PATH 116 Changes the current working directory before executing any specified 117 operations. This affects things like where cargo looks by default 118 for the project manifest (Cargo.toml), as well as the directories 119 searched for discovering .cargo/config.toml, for example. This 120 option must appear before the command name, for example cargo -C 121 path/to/my-project build. 122 123 This option is only available on the nightly channel 124 <https://doc.rust-lang.org/book/appendix-07-nightly-rust.html> and 125 requires the -Z unstable-options flag to enable (see #10098 126 <https://github.com/rust-lang/cargo/issues/10098>). 127 128 -h, --help 129 Prints help information. 130 131 -Z flag 132 Unstable (nightly-only) flags to Cargo. Run cargo -Z help for 133 details. 134 135ENVIRONMENT 136 See the reference 137 <https://doc.rust-lang.org/cargo/reference/environment-variables.html> 138 for details on environment variables that Cargo reads. 139 140EXIT STATUS 141 o 0: Cargo succeeded. 142 143 o 101: Cargo failed to complete. 144 145EXAMPLES 146 1. Create or update the lockfile for the current package or workspace: 147 148 cargo generate-lockfile 149 150SEE ALSO 151 cargo(1), cargo-update(1) 152