File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -127,3 +127,21 @@ it can be easy to miss that a dependency is no longer used and can be removed.
127127Trade-offs:
128128- ✅ Faster full build and link times
129129- ❌ May incorrectly flag dependencies as unused or miss some
130+
131+ ### Removing unused features from dependencies
132+
133+ Recommendation: Periodically review unused features from dependencies for removal using third-party tools like
134+ [ cargo-features-manager] ( https://crates.io/crates/cargo-features-manager ) ,
135+ [ cargo-unused-features] ( https://crates.io/crates/cargo-unused-features ) .
136+
137+ When changing code,
138+ it can be easy to miss that a dependency's feature is no longer used and can be removed.
139+ This can reduce the number of transitive dependencies being built or
140+ reduce the amount of code within a crate being built.
141+ When removing features, extra caution is needed because features
142+ may also be used for desired behavior or performance changes
143+ which may not always be obvious from compiling or testing.
144+
145+ Trade-offs:
146+ - ✅ Faster full build and link times
147+ - ❌ May incorrectly flag features as unused
You can’t perform that action at this time.
0 commit comments