Rust reimplementation of vulture (dead code finder) - output-identical to vulture 2.13
Project description
vulture-rs
A Rust reimplementation of
vulture (the Python
dead-code finder), built on the
ruff parser for performance.
Versioned independently; the upstream parity target (currently
vulture 2.13) is stated here, in the package description, and in
the CHANGELOG (a dated entry per release, enforced at release
time).
Drop-in compatible: the binary is named vulture, accepts the same
CLI, and produces byte-identical output — tools that shell out to
vulture via PATH pick it up unchanged (the one visible
difference: --version reports this package's own version, not
2.13).
Install
pip install vulture-rs # ships the `vulture` binary
Wheels for linux x86_64/aarch64 and macOS arm64, published via the
manually-dispatched Release to PyPI workflow (wheels only, no
sdist); every wheel is smoke-tested before it ships.
Results
A large production codebase (6,553 files), 8 cores, median of 5:
| tool | wall time | speedup |
|---|---|---|
| Python vulture 2.13 | 14.31 s | 1x |
| vulture-rs (8 threads) | 0.43 s | 33x |
| vulture-rs (1 thread) | 1.06 s | 13.5x |
Peak memory is comparable (~100 MiB).
Parity
Output is byte-identical (stdout + exit codes) to vulture==2.13:
- on the 6,553-file production codebase above — 2,687 findings, zero diff — across assorted flag combinations;
- across
tests/differential.sh: an edge-case corpus (noqa quirks, whitelist masking, elif chains, encodings incl. latin-1/BOM/CRLF, unreachable code, invisible bindings, decorated defs) times a 12-entry flag matrix; - on two alien corpora: CPython 3.12's stdlib (2,621 findings,
byte-identical incl. normalized stderr) and a 22,286-file
site-packagescorpus (58k findings, 137s -> 3.4s, 41x). There, 144 of 58,008 stdout lines and 11 stderr lines differ - every one triaged to registered deviations (D1 type comments, D16 CPythonSyntaxWarningchatter), zero parity bugs; - on six popular open-source repos (requests, flask, click, rich, celery, django; 3,736 files, 25-54x) — byte-identical.
Known, deliberate deviations (error-message prose, type comments,
crash-path cleanups) are enumerated in
docs/vulture-rust-spec.md §1; the full behavioral contract lives in
docs/vulture-spec.md. Both specs were reverse-engineered from
vulture 2.13 and review-hardened before this implementation.
The parity reference is vulture 2.13 on CPython 3.12: the parser is version-gated to 3.12, so syntax newer than that (PEP 696 type-param defaults, t-strings, …) is a syntax error here exactly as it is there. Bumping the reference is a deliberate task.
Build & test
cargo build --release # target/release/vulture
cargo test # CPython-generated vector tests
tests/differential.sh <python-vulture> target/release/vulture
tests/og_corpus.sh <python-vulture> target/release/vulture
CI (.github/workflows/ci.yml) runs fmt, clippy, the vector tests,
and both differential harnesses against a pinned vulture==2.13 on
every PR and push to main.
Regenerate the test vectors with python3 tests/gen_vectors.py
(needs CPython 3.12).
The ruff_* dependencies are git-pinned to a ruff release tag (the
crates.io releases under those names are stale placeholders). Treat
upgrades as a deliberate task gated on the differential suite.
Usage
Same CLI as Python vulture:
vulture <paths> [--exclude PATTERNS] [--ignore-names PATTERNS]
[--ignore-decorators PATTERNS] [--min-confidence N]
[--sort-by-size] [--make-whitelist] [-v]
Exit codes: 0 clean, 1 invalid input, 2 invalid arguments, 3 dead code found.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vulture_rs-1.0.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: vulture_rs-1.0.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.2 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c13ca4af80dd82fb524f43672472f29f815a317d39de31c012221250e0401d58
|
|
| MD5 |
4991a422ed45d1fa880b8c421f947022
|
|
| BLAKE2b-256 |
a9eb304a8a9d15fb2d128009c3c29d96013fd17d8de2274b1ba1dcb562935e81
|
Provenance
The following attestation bundles were made for vulture_rs-1.0.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on closeio/vulture-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vulture_rs-1.0.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
c13ca4af80dd82fb524f43672472f29f815a317d39de31c012221250e0401d58 - Sigstore transparency entry: 2172510360
- Sigstore integration time:
-
Permalink:
closeio/vulture-rs@8c7d860878a4d6325b84584636e367d2b457da0c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/closeio
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8c7d860878a4d6325b84584636e367d2b457da0c -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file vulture_rs-1.0.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: vulture_rs-1.0.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 2.0 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5765a537b7ab1f6d14309dd31dedef715314378a771ebf034b59942802fd9d4c
|
|
| MD5 |
173ebfe1f5e4d659d976efeae0533fd8
|
|
| BLAKE2b-256 |
a0b20c37aff8328a30d0d2f76205dec5a1039cf8aa5e74ef6f51f7cbf67e3530
|
Provenance
The following attestation bundles were made for vulture_rs-1.0.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on closeio/vulture-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vulture_rs-1.0.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
5765a537b7ab1f6d14309dd31dedef715314378a771ebf034b59942802fd9d4c - Sigstore transparency entry: 2172510377
- Sigstore integration time:
-
Permalink:
closeio/vulture-rs@8c7d860878a4d6325b84584636e367d2b457da0c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/closeio
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8c7d860878a4d6325b84584636e367d2b457da0c -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file vulture_rs-1.0.0-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: vulture_rs-1.0.0-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.0 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
818ae0f900febac2dffd5f11940dd2cbddb40303b950dfa53c8c202cd8bbf6d6
|
|
| MD5 |
59f4246b5694247c9d7c1167c9e68851
|
|
| BLAKE2b-256 |
95d2fb331ec84275165857e3668dc26b7495a09a3e920cdc483b8956fba817c0
|
Provenance
The following attestation bundles were made for vulture_rs-1.0.0-py3-none-macosx_11_0_arm64.whl:
Publisher:
release.yml on closeio/vulture-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vulture_rs-1.0.0-py3-none-macosx_11_0_arm64.whl -
Subject digest:
818ae0f900febac2dffd5f11940dd2cbddb40303b950dfa53c8c202cd8bbf6d6 - Sigstore transparency entry: 2172510370
- Sigstore integration time:
-
Permalink:
closeio/vulture-rs@8c7d860878a4d6325b84584636e367d2b457da0c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/closeio
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8c7d860878a4d6325b84584636e367d2b457da0c -
Trigger Event:
workflow_dispatch
-
Statement type: