Linux command
cargo-info 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Show package information
cargo info [serde]
Show specific version info
cargo info [serde@1.0]
Show info for local package
cargo info
Show info with features
cargo info [tokio]
说明
cargo info displays information about a package from crates.io or the local workspace. Shows metadata from Cargo.toml including name, version, description, license, dependencies, and features. For local workspace packages, displays information from the local manifest. Creates Cargo.lock if it doesn't exist.
参数
- --registry _name_
- Use specified registry
- --index _url_
- Use specified registry index
- --manifest-path _path_
- Path to Cargo.toml
- -v, --verbose
- Verbose output
- -q, --quiet
- Suppress output
FAQ
What is the cargo-info command used for?
cargo info displays information about a package from crates.io or the local workspace. Shows metadata from Cargo.toml including name, version, description, license, dependencies, and features. For local workspace packages, displays information from the local manifest. Creates Cargo.lock if it doesn't exist.
How do I run a basic cargo-info example?
Run `cargo info [serde]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --registry _name_ do in cargo-info?
Use specified registry