cargo-shear Boshen
winget install --id=Boshen.cargo-shear -e Cargo Shear is a tool designed to detect and fix issues in Rust projects by analyzing dependencies and source files. It helps maintain project integrity by identifying unused or misplaced dependencies in Cargo.toml and unlinked Rust files that are not part of the module tree.
Key Features:
- Detects unused dependencies, ensuring
Cargo.tomlremains clean and optimized. - Identifies misplaced dependencies, such as dev or build dependencies placed in the wrong sections.
- Finds unlinked source files that are not reachable from any module tree, helping to prevent dead code.
- Automatically fixes issues with the
--fixflag, streamlining project maintenance.
Audience & Benefit: Ideal for Rust developers and teams working on complex projects. By automatically detecting and resolving dependency and file issues, Cargo Shear helps maintain a clean, efficient codebase, preventing bloat and ensuring all components are properly linked. This tool is particularly useful for CI/CD pipelines, where it can enforce strict checks or generate machine-readable JSON output for integration with other tools.
Cargo Shear can be installed via winget, making it accessible for developers to integrate into their workflows and improve project reliability.