CARGO-SEARCH(1)

πŸ“¦ version 1.85.1, in ubuntu jammy, ubuntu noble, ubuntu questing

✨ 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 the registry.default config key, which defaults to crates-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 the term.verbose config 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 the term.quiet config 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 to cargo starts with +, it gets interpreted as a rustup toolchain name (like +stable or +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=VALUE or PATH β€” overrides a Cargo configuration value. the argument should be in TOML syntax as KEY=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, like cargo -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. Run cargo -Z help for 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 πŸ“

  1. 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