Tarpaulin is a code coverage reporting tool for Rust projects that integrates with the Cargo build system.
The tool measures line coverage by loading compiled binaries into memory and parsing debugging information to identify which lines were executed during test runs. It supports multiple instrumentation backends: on Linux it defaults to Ptrace tracing on x86_64 processors, while macOS and Windows use LLVM coverage instrumentation by default. The Ptrace backend can be switched to LLVM coverage with a command-line flag. Tarpaulin can also run in Docker, making it accessible to developers not using Linux locally.
Developers should choose Tarpaulin if they need line coverage reporting for Rust projects and can work within its constraints. It works with the full Cargo test CLI, supports coverage of tests, doctests, benchmarks, and examples, and can upload results to Coveralls or Codecov. The tool generates HTML reports and other coverage formats, and allows excluding files from coverage calculations through configuration files. The README notes that doc tests with the should_panic attribute will not report coverage when using LLVM instrumentation.
The project maintains active engagement with reported issues and welcomes contributions. Development is responsive to edge cases, with the maintainers explicitly requesting detailed bug reports including setup information and example projects to fix coverage failures caused by unique package and build feature combinations. The tool acknowledges known compiler regressions that affect accuracy and provides troubleshooting documentation alongside contribution guidelines.