8 个版本 (4 个重大更新)
0.7.0 | 2024 年 6 月 9 日 |
---|---|
0.6.0 | 2024 年 4 月 17 日 |
0.4.2 | 2024 年 2 月 20 日 |
0.4.1 | 2024 年 1 月 11 日 |
0.1.0 |
|
#166 in Cargo 插件
46KB
918 行
货物信息
此项目是对 Rust Lang Cargo 仓库中的 问题 #948 的回应。
描述
cargo-info
是一个提供关于 Rust 包的详细信息工具。它从包的 Cargo.toml
文件中获取数据,并以用户友好的格式展示。
功能
- 与所有与 Cargo 兼容的注册表协同工作
- 获取并显示基本包信息(名称、版本、所有者等)
- 显示包依赖及其版本
- 提供有关包功能的信息
安装
Cargo
要安装 cargo-info
,请运行以下命令
cargo install cargo-information
或如果您想从主分支安装最新版本
cargo install cargo-information --git https://github.com/hi-rustin/cargo-information.git
此库依赖于 OpenSSL。在安装 cargo-info
之前,您可能需要在您的系统上安装 OpenSSL。或者您可以使用 vendored-openssl
功能使用 OpenSSL 的存档版本
cargo install cargo-information --features vendored-openssl
Arch Linux
cargo-info
可以通过 AUR 使用 AUR 辅助工具 安装。例如
paru -S cargo-information
NixOS
cargo-info
可从 nixpkgs 获得。例如,要使用 flakes 启用将 cargo-info
添加到您的 shell
nix shell nixpkgs#cargo-information
用法
安装后,您可以使用cargo info
命令,后跟包名,来获取有关包的信息。
$ cargo info --help
Display info about a package in the registry
Usage: cargo info [OPTIONS] <SPEC>
Options:
--index <INDEX> Registry index URL to search packages in
--registry <REGISTRY> Registry to search packages in
-v, --verbose... Use verbose output (-vv very verbose/build.rs output)
-q, --quiet Do not print cargo log messages
--color <WHEN> Coloring: auto, always, never
--config <KEY=VALUE> Override a configuration value
-Z <FLAG> Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
-h, --help Print help
Package Selection:
<SPEC> Package to inspect
Manifest Options:
--frozen Require Cargo.lock and cache are up to date
--locked Require Cargo.lock is up to date
--offline Run without accessing the network
Run `cargo help info` for more detailed information.
贡献
欢迎贡献!请随时提交拉取请求。
许可证
本项目受MIT许可证许可。
依赖
~84MB
~1.5M SLoC