CARGO-SEARCH(1)
β¨ CARGO-SEARCH(1) β¨
okay bestie so this is the cargo-search page from the General Commands Manual and it's literally about searching for packages in the registry β and the default registry is crates.io, no cap π«Ά
πΈ NAME πΈ
cargo-search β bestie, this searches packages in the registry. Default registry is crates.io. periodt π
π SYNOPSIS π
cargo search [options] [queryβ¦]
π¦ DESCRIPTION π¦
So what it does is a textual search for crates over on <https://crates.io>. The crates that match will show up right there along with their description, all formatted in TOML so you can straight-up copy it into a Cargo.toml manifest. it's giving copy-paste-and-go β¨
π OPTIONS π
π Search Options
--limit limitβ caps how many results you get back (default:10, max:100). know your limits, queen π--index indexβ the URL of the registry index you wanna use.--registry registryβ the name of the registry to use. Registry names get defined in Cargo config files <https://doc.rust-lang.org/cargo/reference/config.html>. If you don't specify one, the default registry gets used, and that one is defined by theregistry.defaultconfig key, which defaults tocrates-io.
π Display Options
-v,--verboseβ use verbose output. You can say it twice for "very verbose" output, which includes extra stuff like dependency warnings and build script output. You can also set this with theterm.verboseconfig value <https://doc.rust-lang.org/cargo/reference/config.html>. double it and give it to the next person fr fr π-q,--quietβ do not print cargo log messages. You can also set this with theterm.quietconfig value <https://doc.rust-lang.org/cargo/reference/config.html>. shhh π€«--color whenβ controls when colored output is used. valid values are:auto(default): automatically detects if color support is available on the terminal.always: always display colors.never: never display colors.
You can also set this with the term.color config value <https://doc.rust-lang.org/cargo/reference/config.html>. aesthetics are customizable bestie π
π Common Options
+toolchainβ if Cargo was installed with rustup, and the first argument tocargostarts with+, it gets interpreted as a rustup toolchain name (like+stableor+nightly). See the rustup documentation <https://rust-lang.github.io/rustup/overrides.html> for more on how toolchain overrides work. main character toolchain selection π--config KEY=VALUEorPATHβ overrides a Cargo configuration value. the argument should be in TOML syntax asKEY=VALUE, or handed over as a path to an extra configuration file. This flag can be specified multiple times. See the command-line overrides section <https://doc.rust-lang.org/cargo/reference/config.html#command-line-overrides> for more info.-C PATHβ changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml), plus the directories it searches for discovering.cargo/config.toml, for example. This option must appear before the command name, likecargo -C path/to/my-project build.
This option is only available on the nightly channel <https://doc.rust-lang.org/book/appendix-07-nightly-rust.html> and requires the -Z unstable-options flag to enable (see #10098 <https://github.com/rust-lang/cargo/issues/10098>). unstable era behavior, iykyk π
-h,--helpβ prints help information. classic π«Ά-Z flagβ unstable (nightly-only) flags for Cargo. Runcargo -Z helpfor details.
π ENVIRONMENT π
See the reference <https://doc.rust-lang.org/cargo/reference/environment-variables.html> for the details on environment variables that Cargo reads. it knows things about your setup π
β EXIT STATUS β
0: Cargo succeeded. slay π101: Cargo failed to complete. not slay π
π EXAMPLES π
- Search for a package from crates.io:
cargo search serde
π§ SEE ALSO π§
cargo(1), cargo-install(1), cargo-publish(1)
and that's the whole page bestie!! this was CARGO-SEARCH(1) from the General Commands Manual β go search some crates and be iconic about it ππ stay hydrated, read your docs, and remember: the default registry is crates.io, always has been, always will be. bye bestie!! π¦β¨
π¦ where this page comes from
- ubuntu jammy: cargo-1.82 1.82.0+dfsg0ubuntu0~jammy-0ubuntu0.22.04.1 Β· Apache-2.0 WITH LLVM exception
- ubuntu noble: cargo-1.82 1.82.0+dfsg0ubuntu0-0ubuntu0.24.04.1 Β· Apache-2.0 WITH LLVM exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms