bnjbvr / cargo-machete

Remove unused Rust dependencies with this one weird trick!
MIT License
722 stars 29 forks source link

Feature Idea: Centralized config file #118

Open torokati44 opened 5 months ago

torokati44 commented 5 months ago

While adding ignore entries to Cargo.toml is fine, as there is rarely any need for it; I think it would be nicer if there was (also) a way to put this metadata in one place, into a dedicated config file somewhere; for example machete.toml in the workspace root.

PS Thank you for this tool, and the explainer blog post too!

bnjbvr commented 5 months ago

Thanks for the issue. I think that would be reasonable; an alternative is to use ignored packages in the Cargo workspace, but that might be overly broad, so a more targeted machete.toml file with a mapping of crates -> ignored could work, as well as general options (e.g. use --with-metadata all the time).

If anyone wants to start implementing something like this, please go ahead!