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