[EXPERIMENTAL] A wrapper for source based code coverage (-Zinstrument-coverage).
cargo install cargo-llvm-cov --version 0.1.0-alpha.2
cargo install cargo-binutils
cargo install rustfilt
rustup component add llvm-tools-previewAlternatively, 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.
See cargo llvm-cov --help for a complete list of options
By default, only the summary is displayed in the terminal.
cargo llvm-covWith html report (report will be generated to target/llvm-cov):
cargo llvm-cov --html
open target/llvm-cov/index.htmlor
cargo llvm-cov --openWith json report:
cargo llvm-cov --jsonWith plain text report (for use in online code coverage services like codecov.io):
cargo llvm-cov --textLicensed 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.