1CARGO-SEARCH(1)             General Commands Manual            CARGO-SEARCH(1)
2
3
4

NAME

6       cargo-search — Search packages in crates.io
7

SYNOPSIS

9       cargo search [options] [query…]
10

DESCRIPTION

12       This performs a textual search for crates on <https://crates.io>. The
13       matching crates will be displayed along with their description in TOML
14       format suitable for copying into a Cargo.toml manifest.
15

OPTIONS

17   Search Options
18       --limit limit
19           Limit the number of results (default: 10, max: 100).
20
21       --index index
22           The URL of the registry index to use.
23
24       --registry registry
25           Name of the registry to use. Registry names are defined in Cargo
26           config files
27           <https://doc.rust-lang.org/cargo/reference/config.html>. If not
28           specified, the default registry is used, which is defined by the
29           registry.default config key which defaults to crates-io.
30
31   Display Options
32       -v, --verbose
33           Use verbose output. May be specified twice for “very verbose”
34           output which includes extra output such as dependency warnings and
35           build script output. May also be specified with the term.verbose
36           config value
37           <https://doc.rust-lang.org/cargo/reference/config.html>.
38
39       -q, --quiet
40           Do not print cargo log messages. May also be specified with the
41           term.quiet config value
42           <https://doc.rust-lang.org/cargo/reference/config.html>.
43
44       --color when
45           Control when colored output is used. Valid values:
46
47auto (default): Automatically detect if color support is
48               available on the terminal.
49
50always: Always display colors.
51
52never: Never display colors.
53
54           May also be specified with the term.color config value
55           <https://doc.rust-lang.org/cargo/reference/config.html>.
56
57   Common Options
58       +toolchain
59           If Cargo has been installed with rustup, and the first argument to
60           cargo begins with +, it will be interpreted as a rustup toolchain
61           name (such as +stable or +nightly). See the rustup documentation
62           <https://rust-lang.github.io/rustup/overrides.html> for more
63           information about how toolchain overrides work.
64
65       --config KEY=VALUE or PATH
66           Overrides a Cargo configuration value. The argument should be in
67           TOML syntax of KEY=VALUE, or provided as a path to an extra
68           configuration file. This flag may be specified multiple times. See
69           the command-line overrides section
70           <https://doc.rust-lang.org/cargo/reference/config.html#command-line-overrides>
71           for more information.
72
73       -C PATH
74           Changes the current working directory before executing any
75           specified operations. This affects things like where cargo looks by
76           default for the project manifest (Cargo.toml), as well as the
77           directories searched for discovering .cargo/config.toml, for
78           example. This option must appear before the command name, for
79           example cargo -C path/to/my-project build.
80
81           This option is only available on the nightly channel
82           <https://doc.rust-lang.org/book/appendix-07-nightly-rust.html> and
83           requires the -Z unstable-options flag to enable (see #10098
84           <https://github.com/rust-lang/cargo/issues/10098>).
85
86       -h, --help
87           Prints help information.
88
89       -Z flag
90           Unstable (nightly-only) flags to Cargo. Run cargo -Z help for
91           details.
92

ENVIRONMENT

94       See the reference
95       <https://doc.rust-lang.org/cargo/reference/environment-variables.html>
96       for details on environment variables that Cargo reads.
97

EXIT STATUS

990: Cargo succeeded.
100
101101: Cargo failed to complete.
102

EXAMPLES

104        1. Search for a package from crates.io:
105
106               cargo search serde
107

SEE ALSO

109       cargo(1), cargo-install(1), cargo-publish(1)
110
111
112
113                                                               CARGO-SEARCH(1)
Impressum