CARGO-SEARCH(1)
๐ CARGO-SEARCH โ bestie's guide to searching packages ๐
okay so this is the cargo-search manual page, and no, it's not some dusty old scroll, it's literally your new fave command for finding crates. Let's get into it ๐ซถ
โจ SYNOPSIS โจ
cargo search [options] [queryโฆ]
๐ธ DESCRIPTION ๐ธ
so what does this do? it does a textual search for crates over on https://crates.io. and the way it serves the results back to you? immaculate. every matching crate shows up next to its description in TOML format, all pretty and pre-formatted so you can literally copy-paste it straight into your Cargo.toml manifest. it's giving "i did the work so you don't have to" ๐
๐ OPTIONS ๐
๐ Search Options
--limit limitโ caps how many results you get back. default is10, max is100. yes bestie, there IS a ceiling, don't push it ๐--index indexโ the URL of the registry index you wanna use.--registry registryโ the name of the registry to use. registry names live in the 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 default is decided by theregistry.defaultconfig key โ which itself defaults tocrates-io. layers on layers, ik ik ๐ง
๐ฅ๏ธ Display Options
-v,--verboseโ verbose output. you can pass it twice for "very verbose" output, which throws in extra stuff like dependency warnings and build script output. can also be set with theterm.verboseconfig value (https://doc.rust-lang.org/cargo/reference/config.html).-q,--quietโ do NOT print cargo log messages. silence, but make it fashion ๐. can also be set with theterm.quietconfig value (https://doc.rust-lang.org/cargo/reference/config.html).--color whenโ controls when colored output kicks in. valid values are:auto(the default): automatically detects whether your terminal can even do color support.always: always display colors. always. no matter what. slay ๐never: never display colors. monochrome era ๐ค
can also be set with the term.color config value (https://doc.rust-lang.org/cargo/reference/config.html).
๐งฉ Common Options
+toolchainโ if Cargo was installed withrustup, and the first argument tocargostarts with+, it gets interpreted as a rustup toolchain name (like+stableor+nightly). peep the rustup documentation (https://rust-lang.github.io/rustup/overrides.html) for the full tea on how toolchain overrides work.--config KEY=VALUEorPATHโ overrides a Cargo configuration value. the argument has to be in TOML syntax ofKEY=VALUE, or you can hand it a path to an extra config file instead. this flag is stackable โ specify it as many times as you want. check the command-line overrides section (https://doc.rust-lang.org/cargo/reference/config.html#command-line-overrides) for more.-C PATHโ changes the current working directory before executing any specified operations. this affects stuff like where cargo looks by default for the project manifest (Cargo.toml), and also the directories it searches when discovering.cargo/config.toml, for example. this option must appear before the command name, likecargo -C path/to/my-project build.
โ ๏ธ heads up bestie: this option is only available on the nightly channel (https://doc.rust-lang.org/book/appendix-07-nightly-rust.html) and it requires the-Z unstable-optionsflag to enable (see #10098,https://github.com/rust-lang/cargo/issues/10098). unstable queen behavior only ๐
-h,--helpโ prints help information. the classic.-Z flagโ unstable (nightly-only) flags for Cargo. runcargo -Z helpfor the details. iykyk ๐ญ
๐ฟ ENVIRONMENT ๐ฟ
see the reference (https://doc.rust-lang.org/cargo/reference/environment-variables.html) for all the deets on environment variables that Cargo reads. it's a whole vibe in there.
๐ซ EXIT STATUS ๐ซ
0: Cargo succeeded. we ate and left no crumbs โจ101: Cargo failed to complete. it's not giving, it's giving up ๐
๐ฆ EXAMPLES ๐ฆ
- search for a package from crates.io:
cargo search serde
๐ SEE ALSO ๐
okay that's the whole page bestie, you're officially a cargo search expert, go find some crates and make something iconic ๐
this was CARGO-SEARCH(1) from the General Commands Manual, part of the Cargo source & version family, dated to match its manpage release. mwah, love u, go touch some crates ๐
๐ฆ where this page comes from
- ubuntu questing: cargo-1.88 1.88.0+dfsg0ubuntu1-0ubuntu1
- ubuntu questing: cargo-1.88 1.88.0+dfsg0ubuntu1-0ubuntu2
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms