Requirements: Rust 1.85+ (stable). Install via rustup.
git clone https://github.com/ashlar-display/display-types.git
cd display-types
cargo buildcargo test # std (default)
cargo test --features serde # std + serde
cargo build --no-default-features --features alloc # alloc-only build check
cargo build --no-default-features # bare no_std build checkInstall cargo-llvm-cov and the LLVM
tools component:
rustup component add llvm-tools-preview
cargo install cargo-llvm-covMeasure coverage across all feature sets:
cargo llvm-cov clean --workspace
cargo llvm-cov --no-report
cargo llvm-cov --no-report --features serde
cargo llvm-cov report --summary-onlyTo update .coverage-baseline after improving coverage:
cargo llvm-cov clean --workspace
cargo llvm-cov --no-report
cargo llvm-cov --no-report --features serde
cargo llvm-cov report --json --summary-only \
| python3 -c "import sys,json; d=json.load(sys.stdin); print(round(d['data'][0]['totals']['lines']['percent'], 2))" \
> .coverage-baselineCommit .coverage-baseline alongside the tests that raised it. CI will open the PR
automatically when coverage improves on a push to main or develop, but you can also
update it manually as part of your feature branch.