21 个版本
新版本 0.9.13 | 2024年8月18日 |
---|---|
0.9.12 | 2024年5月6日 |
0.9.11 | 2024年4月13日 |
0.9.10 | 2024年3月17日 |
0.6.0 | 2019年12月4日 |
在 Cargo 插件 中排名 #180
每月 109 次下载
在 3 个 crates 中使用(通过 ts-bindgen-build-support)
88KB
2K SLoC
cargo-whatfeatures
目录
安装
安装 cargo 后,只需执行
cargo install cargo-whatfeatures
注意 您可以通过以下方式切换到使用 rustls
cargo install cargo-whatfeatures --no-default-features --features "rustls"
默认情况下,它使用 native-tls 后端
颜色说明
如果 NO_COLOR
环境变量有值,则所有颜色都将被禁用。
如果 WHATFEATURES_THHEME
环境变量具有以下值之一: [colorful, basic, palette, none]
,则主题将被覆盖。这仍然会尊重 NO_COLOR
使用方法
cargo-whatfeatures 0.9.12
the `whatfeatures` command
USAGE:
cargo whatfeatures [FLAGS] [OPTIONS] <crate>
FLAGS:
-h, --help
Prints help information
-V, --version
Displays the program name and version
-d, --deps
Display dependencies for the crate
This will list the required dependencies
-n, --no-features
Disable listing the features for the crate
-r, --restricted
When used on a local workspace, also included private packages
-t, --this-crate
When used on a crate in a local workspace, don't traverse to the root
Normally, if you're in a workspace member, it will traverse to the root
and list all sibling crates as well. This flag disabled that behavior
-l, --list
List all versions for the crate.
When using the `-y` option, yanked crates can be filtered.
-s, --short
Display only the name and latest version, such as foo = 0.1.2
-v, --verbose
When this is enabled, all 'implied' features will be listed.
Also, optional dependencies will be listed. Optional deps are technically features.
-o, --offline
Don't connect to the internet, limits the availities of this.
If the crate is in either cargo's local registry, or whatfeatures' cache
then this will work normally, otherwise it'll give you a nice error.
-j, --json
This outputs JSON rather than the human readable format
--print-cache-dir
Prints out the path to the cache directory
--purge
Purges the local cache. The command will automatically clean up after
itself if it sees the crate in the cargo local registry. If its not
in the cargo registry, it'll download the crate from crates.io and place
it in its cache.
This flag causes that cache to become invalidated.
The cache is located at these locations:
* Linux: $XDG_CACHE_HOME/museun/whatfeatures
* Windows: %LOCALAPPDATA/museun/whatfeatures
* macOS: $HOME/Library/Caches/museun/whatfeatures
--theme [basic, colorful]
use this provided theme
OPTIONS:
-c, --color [always, auto, never]
Attempts to use colors when printing as text [default: auto]
*NOTE* When NO_COLOR is set to any value, all colors will be disabled
-p, --pkgid <semver>
A specific version to lookup. e.g. foo:0.7.1
If this is not provided, then the latest crate is used.
--manifest-path <PATH>
A path to the Cargo.toml you want to read, locally.
This can be the root directory to the crate/workspace, or an explicit path to a Cargo.toml
Use this to read from a local crate, rather than a remote one.
-y, --show-yanked <exclude, include, only>
Shows any yanked versions when using `--list`. [default: exclude].
When 'exclude' is provided, only active releases versions will be listed
When 'include' is provided, the listing will include yanked versions along with active releases.
When 'only' is provided, only yanked versions will be listed
ARGS:
<crate> The name of the crate to retrieve information for.
If this is a path to a directory containing a Cargo.toml,
or the path to the Cargo.toml then it'll use that directory
as the crate to operate one
This is exclusive with -p, --pkgid and with --manifest-path.
CONFIG:
WHATFEATURES_THEME [colorful, basic, palette, none]
This allows you to override the --theme flag with an environmental variable
这允许您查找特定版本的特定 crate,并获取其 默认 和 可选 特性。它还允许列出指定 crate 的依赖项。
您也可以在本地 crates 和工作区中使用它。
使用方法: example.md
许可证
cargo-whatfeatures
主要在 MIT 许可证和 Apache 许可证(版本 2.0)的条款下分发。
请参阅 LICENSE-APACHE 和 LICENSE-MIT 以获取详细信息。
依赖项
~6–15MB
~240K SLoC