# bnjbvr/cargo-machete

Remove unused Rust dependencies with this one weird trick!

Repository: https://github.com/bnjbvr/cargo-machete
Canonical: https://ross.abutalabs.com/products/cargo-machete
Language: Rust
License: MIT
License Family: permissive
Topics: rust, rust-lang, cargo, cargo-subcommand
Last push: 2026-08-10T14:16:06+00:00

## Health v2 (maintenance only)
Score: 83/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 55, longevity 100
- inputs: {"age_days": 1774, "days_push": 23, "days_rel": 140, "gap_med": 161.0, "n_releases_24m": 5}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1356, forks 54 (observed 2026-08-28T04:04:29.277455+00:00)

## What it is
cargo-machete is a Cargo subcommand that quickly detects unused dependencies in Rust projects by scanning source code for dependency names. It is fast but imprecise, with configuration options to ignore false positives and a CI-friendly exit code.

## Use cases
- find unused dependencies in a rust project
- clean up cargo.toml dependencies
- check for unused crates in ci
- detect dependencies that are no longer imported
- reduce compile time by removing unused deps

## When to choose
- you want a fast, dependency-free scan of unused Rust dependencies
- you want a simple CI check via exit codes
- you maintain many Rust crates and want quick hygiene checks

## When to avoid
- you need fully accurate analysis including build.rs-generated code without extra flags
- you need cross-language dependency analysis
- you cannot tolerate possible false positives without configuration

## Facets
- artifact type: cli-tool
- maturity: active
- function: developer-tools, dependency-audit, cli, build-tool
- domain: developer-tools, programming-languages
- platform: cli, rust, cross-platform
- tags: cargo-subcommand, unused-dependencies, rust, linting, ci-friendly, command-line

## Member repositories
- bnjbvr/cargo-machete (main) score 83

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:29.277455+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:41:53.829533+00:00, confidence not recorded.
  - readme: https://github.com/bnjbvr/cargo-machete (fetched 2026-08-28T04:04:29.277455+00:00, sha 5762c62590e9)
  - registry_crates: https://crates.io/api/v1/crates/cargo-machete (fetched 2026-08-29T12:00:05.653085+00:00, sha 482bdacacace)
- Data as of 2026-08-30T08:39:29.467469+00:00.
