Crates.io | cargo-lookup |
lib.rs | cargo-lookup |
version | 0.1.0 |
source | src |
created_at | 2024-03-09 00:55:53.87035 |
updated_at | 2024-03-09 00:55:53.87035 |
description | Command-line crate registry index querying for Cargo |
homepage | https://github.com/collinoc/cargo-lookup |
repository | https://github.com/collinoc/cargo-lookup |
max_upload_size | |
id | 1167519 |
size | 94,958 |
A command-line utility for querying Rust crate registry indexes
Cargo Lookup allows you to query crate indexes for info about different crates, including features and dependencies. You can also specify semantic versioning requirements to query info for a specific release of a crate!
The quickest way to install Cargo Lookup is via Cargo
$ cargo install cargo-lookup
Below are some common usage examples that you might find use of. Run cargo lookup --help
to see what else it can do!
$ cargo lookup libc --type=features
libc:align const-extern-fn default extra_traits rustc-dep-of-std std use_std
$ cargo add syn --features=$(cargo lookup syn --format=cargo-add-all)
Updating crates.io index
Adding syn v2.0.52 to dependencies.
Features:
+ clone-impls
+ derive
+ extra-traits
+ fold
+ full
+ parsing
+ printing
+ proc-macro
+ quote
+ test
+ visit
+ visit-mut
Updating crates.io index
$ cargo lookup serde libc --type=deps
libc:rustc-std-workspace-core
serde:serde_derive serde_derive serde_derive
$ cargo lookup semver --type=json --format=pretty
[
{
"name": "semver",
"vers": "1.0.22",
"deps": [
{
"name": "serde",
"req": "^1.0.194",
"features": [],
"optional": true,
"default_features": false,
"target": null,
"kind": "normal",
"registry": null,
"package": null
}
],
"cksum": "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca",
"features": {
"default": [
"std"
],
"std": []
},
"yanked": false,
"links": null,
"v": 1,
"features2": null,
"rust_version": "^1.31"
}
]