fork/cargo

git clone https://git.julia.blue/fork/cargo

borsAuto merge of #12962 - hi-rustin:rustin-patch-cargo-search, r=weihangloa4764b0dd

0.90.0
3.9 KiB109 linesraw
1CARGO-SEARCH(1)
2
3NAME
4       cargo-search — Search packages in the registry. Default registry is
5       crates.io
6
7SYNOPSIS
8       cargo search [options] [query…]
9
10DESCRIPTION
11       This performs a textual search for crates on <https://crates.io>. The
12       matching crates will be displayed along with their description in TOML
13       format suitable for copying into a Cargo.toml manifest.
14
15OPTIONS
16   Search Options
17       --limit limit
18           Limit the number of results (default: 10, max: 100).
19
20       --index index
21           The URL of the registry index to use.
22
23       --registry registry
24           Name of the registry to use. Registry names are defined in Cargo
25           config files
26           <https://doc.rust-lang.org/cargo/reference/config.html>. If not
27           specified, the default registry is used, which is defined by the
28           registry.default config key which defaults to crates-io.
29
30   Display Options
31       -v, --verbose
32           Use verbose output. May be specified twice for “very verbose”
33           output which includes extra output such as dependency warnings and
34           build script output. May also be specified with the term.verbose
35           config value
36           <https://doc.rust-lang.org/cargo/reference/config.html>.
37
38       -q, --quiet
39           Do not print cargo log messages. May also be specified with the
40           term.quiet config value
41           <https://doc.rust-lang.org/cargo/reference/config.html>.
42
43       --color when
44           Control when colored output is used. Valid values:
45
46           o  auto (default): Automatically detect if color support is
47              available on the terminal.
48
49           o  always: Always display colors.
50
51           o  never: Never display colors.
52
53           May also be specified with the term.color config value
54           <https://doc.rust-lang.org/cargo/reference/config.html>.
55
56   Common Options
57       +toolchain
58           If Cargo has been installed with rustup, and the first argument to
59           cargo begins with +, it will be interpreted as a rustup toolchain
60           name (such as +stable or +nightly). See the rustup documentation
61           <https://rust-lang.github.io/rustup/overrides.html> for more
62           information about how toolchain overrides work.
63
64       --config KEY=VALUE or PATH
65           Overrides a Cargo configuration value. The argument should be in
66           TOML syntax of KEY=VALUE, or provided as a path to an extra
67           configuration file. This flag may be specified multiple times. See
68           the command-line overrides section
69           <https://doc.rust-lang.org/cargo/reference/config.html#command-line-overrides>
70           for more information.
71
72       -C PATH
73           Changes the current working directory before executing any specified
74           operations. This affects things like where cargo looks by default
75           for the project manifest (Cargo.toml), as well as the directories
76           searched for discovering .cargo/config.toml, for example. This
77           option must appear before the command name, for example cargo -C
78           path/to/my-project build.
79
80           This option is only available on the nightly channel
81           <https://doc.rust-lang.org/book/appendix-07-nightly-rust.html> and
82           requires the -Z unstable-options flag to enable (see #10098
83           <https://github.com/rust-lang/cargo/issues/10098>).
84
85       -h, --help
86           Prints help information.
87
88       -Z flag
89           Unstable (nightly-only) flags to Cargo. Run cargo -Z help for
90           details.
91
92ENVIRONMENT
93       See the reference
94       <https://doc.rust-lang.org/cargo/reference/environment-variables.html>
95       for details on environment variables that Cargo reads.
96
97EXIT STATUS
98       o  0: Cargo succeeded.
99
100       o  101: Cargo failed to complete.
101
102EXAMPLES
103       1. Search for a package from crates.io:
104
105              cargo search serde
106
107SEE ALSO
108       cargo(1), cargo-install(1), cargo-publish(1)
109