Skip to content

Latest commit

 

History

History
54 lines (41 loc) · 1.48 KB

setup.md

File metadata and controls

54 lines (41 loc) · 1.48 KB

Development Setup

Requirements: Rust 1.85+ (stable). Install via rustup.

Clone and build

git clone https://github.com/ashlar-display/display-types.git
cd display-types
cargo build

Running tests

cargo 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 check

Coverage

Install cargo-llvm-cov and the LLVM tools component:

rustup component add llvm-tools-preview
cargo install cargo-llvm-cov

Measure 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-only

To 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-baseline

Commit .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.