Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

cargo-llvm-cov

$ cargo-llvm-cov Community Low Risk
Taiki Endo · Code & DevOps · Apache-2.0 OR MIT · macos / linux / windows

cargo-llvm-cov automates llvm-profdata and llvm-cov instrumentation for Rust crates and workspaces. Agents can stream structured JSON (--json), emit compact summaries (--summary-only), or write --lcov files cleanly with --color never.

FCRS-1.0 Score
85 /100
Good
Medium Confidence
Zero-Friction Install
brew install cargo-llvm-cov
CLI vs MCP Decision CLI Only

Local Rust LLVM coverage wrapper around cargo test and cargo nextest; invoke directly in Cargo workspaces.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 22 / 25

Supports --json directly to stdout, --summary-only to cut token bloat, --color never, and --fail-under-lines gates.

  • --json --summary-only emits compact JSON coverage totals
  • --fail-under-lines enforces coverage thresholds via exit code
Trust & Safety 22 / 25

Runs locally without credentials, isolating instrumented builds in target/llvm-cov-target to avoid invalidating normal cargo caches.

  • Dedicated target/llvm-cov-target directory
Setup & Portability 13 / 15

Cross-platform via Homebrew and cargo install, though it requires the llvm-tools-preview rustup component.

  • Requires rustup component add llvm-tools-preview
Utility & Efficiency 13 / 15

Eliminates manual RUSTFLAGS + llvm-profdata plumbing and integrates cleanly with cargo nextest (--nextest) and doctests.

  • Supports --nextest and --doctests in one command
Maintenance & Lineage 8 / 10

Maintained by prolific Rust tooling author Taiki Endo (taiki-e/cargo-llvm-cov).

  • Standard Rust coverage CLI under Apache-2.0 / MIT
Docs & Verifiability 7 / 10

Well-organized README and --help covering flags, nextest integration, and CI workflows.

  • Complete CLI documentation in repository README

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

No credentials required; compiles and profiles local Rust targets via rustc and llvm-tools.

Side Effects
Read-Only Local Write
Cost & Quotas

Dual-licensed Apache-2.0 / MIT open-source tool; free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# cargo-llvm-cov Agent Rules
- Prefer `cargo llvm-cov --json --summary-only --color never` to inspect coverage totals without bloated output.
- Ensure `rustup component add llvm-tools-preview` is installed before running.
- Use `--nextest` when the workspace relies on `cargo-nextest`.

Agent-Ready Command Recipes

Safe Read-Only Queries

Run tests and stream JSON coverage to stdout
cargo llvm-cov --json --summary-only --color never

Runs workspace tests with LLVM instrumentation and outputs compact JSON coverage totals without HTML artifacts.

Controlled Writes & Previews

Export LCOV tracefile for CI
cargo llvm-cov --lcov --output-path target/lcov.info --color never

Runs tests and writes an LCOV tracefile to target/lcov.info.

Strengths for Agents

  • + Native --json --summary-only outputs concise machine-readable coverage directly to stdout.
  • + Seamless integration with cargo nextest via --nextest.
  • + Separates instrumented build artifacts into target/llvm-cov-target.

Caveats & Pitfalls

  • ! Requires llvm-tools-preview rustup component to be installed.
  • ! Full --json without --summary-only can emit very large payloads on multi-crate workspaces.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI