cargo-llvm-cov

crates.io license build status maintenance-status

[EXPERIMENTAL] A wrapper for source based code coverage (-Zinstrument-coverage).

Installation

```sh cargo install cargo-llvm-cov

cargo install cargo-binutils

cargo install rustfilt

rustup component add llvm-tools-preview ```

Alternatively, download compiled binaries from GitHub Releases.

cargo-llvm-cov relies on unstable compiler flags so it requires a nightly toolchain to be installed, though does not require nightly to be the default toolchain or the one with which cargo-llvm-cov itself is executed. If the default toolchain is one other than nightly, running cargo llvm-cov will find and use nightly anyway.

Usage

See cargo llvm-cov --help for a complete list of options

By default, only the summary is displayed in the terminal.

sh cargo llvm-cov

With html report (report will be generated to target/llvm-cov):

sh cargo llvm-cov --html open target/llvm-cov/index.html

or

sh cargo llvm-cov --html --open

With json report:

sh cargo llvm-cov --json

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.