#cargo #features #manager #cli #cli-tool #crates

app cargo-features-manager

A tui tool to enable/disable & prune dependency features

14 releases (6 breaking)

0.7.0 Mar 30, 2024
0.5.3 Feb 12, 2024
0.4.0 Dec 15, 2023
0.3.3 Jul 28, 2023

#177 in Command line utilities

Download history 32/week @ 2024-01-19 22/week @ 2024-01-26 5/week @ 2024-02-02 41/week @ 2024-02-09 63/week @ 2024-02-16 218/week @ 2024-02-23 44/week @ 2024-03-01 38/week @ 2024-03-08 29/week @ 2024-03-15 16/week @ 2024-03-22 176/week @ 2024-03-29 38/week @ 2024-04-05

274 downloads per month

MIT license

65KB
1.5K SLoC

Cargo Features Manger

A TUI-like cli tool to manage the features of your rust-projects dependencies.

You can view all available features and easily toggle (enable & disable) them with one button click. All of your changes will directly be reflected in your Cargo.toml file.

install

cargo install cargo-features-manager

usage

viewer

To start the tool run cargo features in your project root dir.

This will open the dependency-selector:

dependencySelector

Now you can select the dependency for which you want to change the enabled features.

Selecting a dependency will open the feature-selector:

featureSelector

When using cargo features -d <dependency name> it will directly open the corresponding feature-selector.

navigation

to move up

to move down

Space | Enter | to select

ESC | to move back

dependency selector

Dependency which do not have any features are marked grey.
Dev-Dependency are marked with 🧪.
Build-Dependency are marked with 🛠️.
Workspace-Dependency are marked with 🗃️️.

dependencySelector

feature selector

All default features are marked Green.

greenMark

When hovering above a feature it shows other features which the selected feature requires.

featureDependency

Features marked with 📦 mean that they require an optional dependency.

featurePackageDependency

Features which an active feature requires are marked grey.

greyFeature

Features marked with 🗃️️ are enabled by the workspace dependency and can only be disabled by the workspace dependency

workspaceFeatures

search mode

At any point you can start typing like normal. This will start using your input as a search query.

prune

You can run prune with cargo features prune

this will disable all features which are not required to compile.

always keep

If your project requires a features to be enabled which does not make the compile fail. you can create a file called Features.toml in there you can define features which will not get disabled.

clap = ["help"]

Dependencies

~6–16MB
~197K SLoC