Cargo-feature-analyst: analyse the feature usage in your rust project

#1

cargo-feature-analyst is a tool written in rust to analyse the feature usage in your rust project. It is provided as cargo subcommand.

It provides with a list of Enabled features in your dependency tree with names of crates enabling those features and a list of all the disabled features in your dependency tree.

Example output:

Enabled features
------------------

mycrate/default
mycrate/foo
dep1/default[mycrate]
dep1/bar [mycrate]
dep2/baz [mycrate]
dep3-1.0.0/qux [mycrate, dep1]
dep3-1.1.0/quazam [dep2]

Disabled features
-------------------

mycrate/z
dep2/default
dep2/y
dep3-1.0.0/default
dep3-1.0.0/x
dep3-1.1.0/default

The main motivation of this crate was to identify the feature usage of your rust project, to better identify the unused features.

Looking for feedback from the community. Thanks!

Github: https://github.com/psinghal20/cargo-feature-analyst

9 Likes