The rustc-approved way to check code coverage in Rust is long and arduous. In my view, it's just too technical for most users to be comfy using it.
A simpler way
Here's an easier way to check codecov in your Rust workspace:
- Install
cargo-binstall - Use that to get
cargo-tarpaulin - Run it to check code coverage in your project
# install cargo-binstall
|
# get cargo-tarpaulin
# cd to your project
# run cargo-tarpaulin.
#
# note: you can remove `--out Html` if you just want some percentages
That'll generate a file called tarpaulin-report.html in the root of your workspace. You can open it using a web browser to take a look:
You can click on the crates/files to view more information about the exact coverage.