A family of cargo subcommands that wrap standard Rust tooling, filter verbose output, and return compact JSON. Built for minimizing character/token count during agentic LLM sessions.
| Crate | Wraps | Install | Docs |
|---|---|---|---|
| cargo-chec | cargo check |
cargo install cargo-chec |
README |
| cargo-tes | cargo test |
cargo install cargo-tes |
README |
| cargo-carpulin | cargo llvm-cov / cargo tarpaulin |
cargo install cargo-carpulin |
README |
From crates.io (recommended for users):
cargo install cargo-chec cargo-tes cargo-carpulinFrom source (for development):
# Clone the repository
git clone https://github.com/yourusername/rust-log-filter
cd rust-log-filter
# Install all tools to ~/.cargo/bin using just
just install
# Or build and install manually
cargo build --release
cp target/release/cargo-{chec,tes,carpulin} ~/.cargo/bin/Filters cargo check errors and warnings into a JSON array of strings.
cargo chec
# ["Error (severity 5) from rustc in src/main.rs at line 10:5-15: cannot find value `x`"]Filters cargo test failures into a JSON array of strings.
cargo tes
# ["Test failed: tests::my_test (exec_time: 0.001s) - assertion failed", "Suite failed: passed 5, failed 1 (exec_time: 0.003s)"]Runs coverage tools and outputs structured JSON with per-file uncovered line ranges.
cargo carpulin --tool llvm-cov -- -p my-crate{
"summary": {
"lines": { "count": 55, "covered": 30, "percent": 54.5 },
"functions": { "count": 10, "covered": 8, "percent": 80.0 }
},
"files": [
{
"file": "src/lib.rs",
"coverage": { "lines": { "count": 55, "covered": 30, "percent": 54.5 } },
"uncovered_lines": ["16-19", "28-30", "35-46", "49-54"]
}
]
}.
├── wrappers/
│ ├── chec/ # cargo-chec — cargo check filter
│ ├── tes/ # cargo-tes — cargo test filter
│ └── carpulin/ # cargo-carpulin — coverage report filter
├── tools/
│ ├── coverage-test/ # Fixture crate with intentional coverage gaps
│ └── demo-outputs/ # Demo output crate for cargo-tes
├── scripts/
│ └── benchmark.sh # Unified benchmark for all tools
├── fam/ # Project images
├── Justfile # Release task runner
└── Cargo.toml # Workspace root
Learn about benchmarking this workspace.
Run the unified benchmark:
just benchmark
# or
./scripts/benchmark.shThis will benchmark all three tools (cargo-chec, cargo-tes, cargo-carpulin) and update BENCHMARKS.md with fresh results.
# Build all crates
cargo build
# Build and install to ~/.cargo/bin
just install
# Run all tests
just test
# or
cargo test
# Lint
just lint
# or
cargo clippy --workspace
# Format
cargo fmt --all
# Run all checks (test + format + lint)
just checkUse the provided Justfile for release tasks:
# Run all checks
just check
# Dry-run publish
just dry-run
# Full release
just releaseRequires just (install via cargo install just).
Open issues/PRs on GitHub. Built for the Rust ecosystem.
| Member | Type | Path |
|---|---|---|
cargo-chec |
Binary (wrapper) | wrappers/chec/src/main.rs |
cargo-tes |
Binary (wrapper) | wrappers/tes/src/main.rs |
cargo-carpulin |
Binary (wrapper) | wrappers/carpulin/src/main.rs |
demo-outputs |
Library (fixture) | tools/demo-outputs/src/lib.rs |
coverage-test-crate |
Library (fixture) | tools/coverage-test/src/lib.rs |
All wrapper crates follow the same structure:
- Single-file binary in
src/main.rs - Dependencies:
clap4.0 (derive) +serde_json1.0 - Clap subcommand enum for
cargo <name>invocation --input FILEor-for stdin to parse existing output- Trailing
cargo_argspassed through to the underlying tool - Piped stdout/stderr with stderr streaming thread
- Build all:
cargo build - Build one:
cargo build -p cargo-chec - Test all:
cargo test - Test one:
cargo test -p cargo-carpulin - Benchmark:
./scripts/benchmark_carpulin.sh
