1CARGO-SEARCH(1) General Commands Manual CARGO-SEARCH(1)
2
3
4
6 cargo-search - Search packages in crates.io
7
9 cargo search [options] [query...]
10
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
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 No output printed to stdout.
41
42 --color when
43 Control when colored output is used. Valid values:
44
45 · auto (default): Automatically detect if color support is
46 available on the terminal.
47
48 · always: Always display colors.
49
50 · never: Never display colors.
51
52 May also be specified with the term.color config value
53 <https://doc.rust-lang.org/cargo/reference/config.html>.
54
55 Common Options
56 +toolchain
57 If Cargo has been installed with rustup, and the first argument to
58 cargo begins with +, it will be interpreted as a rustup toolchain
59 name (such as +stable or +nightly). See the rustup documentation
60 <https://rust-lang.github.io/rustup/overrides.html> for more
61 information about how toolchain overrides work.
62
63 -h, --help
64 Prints help information.
65
66 -Z flag
67 Unstable (nightly-only) flags to Cargo. Run cargo -Z help for
68 details.
69
71 See the reference
72 <https://doc.rust-lang.org/cargo/reference/environment-variables.html>
73 for details on environment variables that Cargo reads.
74
76 · 0: Cargo succeeded.
77
78 · 101: Cargo failed to complete.
79
81 1. Search for a package from crates.io:
82
83 cargo search serde
84
86 cargo(1), cargo-install(1), cargo-publish(1)
87
88
89
90 CARGO-SEARCH(1)