← Browse all tools

Go Back
Report Abuse

cargo-llvm-cov

Cargo subcommand for LLVM source-based code coverage

Tool overview

cargo-llvm-cov is a Cargo subcommand that makes it easy to use LLVM source-based code coverage for Rust. It is a wrapper around rustc -C instrument-coverage.

It generates precise coverage data, with line and region coverage and optional branch coverage, and supports cargo test, cargo run and cargo nextest with a command-line interface compatible with Cargo. Coverage of proc-macros, UI tests and doc tests can be included, and coverages generated under different test conditions can be merged. It can also report the coverage of C and C++ code linked to a Rust library or binary, of external tests and of AFL fuzzers. It is fast because it only instruments the necessary crates. Reports are produced as text, HTML, JSON, LCOV or Cobertura.

cargo-llvm-cov is free and open source under the Apache 2.0 or MIT licence.

Screenshots & video

Community reviews

Login to Write Your Review

There are no reviews yet.

Source & attribution

Original contributor
Jean-Baptiste CROUIGNEAU
External references
https://github.com/taiki-e/cargo-llvm-cov