# Rust test coverage > Set up Supercov with your agent, or run it yourself with Cargo tests. Web page: https://supercov.com/docs/rust All Supercov pages for agents: https://supercov.com/llms.txt ยท Full text: https://supercov.com/llms-full.txt Ask your coding agent to set up Supercov in your project: ```text supercov-prompt Install Supercov with cargo install supercov. Read supercov docs and check the supported Rust toolchain before running our existing Cargo tests. Show the coverage report and any measurement limits. Don't change application code or tests. ``` ## Run it yourself The supported measurement toolchain is Rust 1.95. Use it for these commands; installing Supercov doesn't change your project's selected toolchain. ```sh cargo install supercov supercov --version ``` Installation builds the CLI from source and can take a few minutes. Make sure Cargo's binary directory is on your `PATH`. You don't need Node.js. ### Run your tests From your crate or workspace root: ```sh supercov -- cargo test ``` Keep the flags your project normally uses. For a workspace or nextest suite: ```sh supercov -- cargo test --workspace supercov -- cargo nextest run --workspace ``` Supercov tracks individual Cargo tests and rustdoc doctests. It also supports cargo-nextest 0.9.138 and newer, including retries. Your test filters and runner options still apply. Inspect the run: ```sh supercov runs latest supercov runs latest gaps --limit 5 ``` ## Try a small example [Download the examples](https://supercov.com/downloads/supercov-language-examples.zip), extract them, and open `supercov-examples/rust`. It is a small crate with no third-party dependencies and two integration tests. In `src/lib.rs`, checkout requires a signed-in customer and an unexpired session: ```rust pub struct Order { pub status: &'static str, pub total: i32 } pub fn checkout(signed_in: bool, expired: bool, price: i32, quantity: i32) -> Order { if signed_in && !expired { let total = price * quantity; return Order { status: "confirmed", total }; } Order { status: "denied", total: 0 } } ``` The tests cover a valid order and a signed-out visitor. From the example folder: ```sh supercov -- cargo test supercov runs latest ``` The coverage section recorded with Supercov 2.0.0 is: ```text Coverage Lines 100.00% (11/11) Branches 100.00% (6/6) MC/DC 50.00% (1/2) ``` This run also measures integration-test code, so its line count includes more than `src/lib.rs`. To inspect the checkout decision specifically: ```sh supercov runs latest decision src/lib.rs:3 ``` The report includes: ```text signed_in && !expired C1 covered: signed_in C2 MISSING: !expired ``` No test checks a signed-in customer with an expired session. Adding that test raises MC/DC to 100% in the [recorded run](https://supercov.com/downloads/coverage-guide-recordings.json). See [MC/DC](https://supercov.com/docs/mcdc?language=rust) for how to read the result. ## Check what the tests assert These tests check `order.status`, but not `order.total`. Adding `assert_eq!(order.total, 50)` would check the calculation for this input. Supercov can ask [Jev](https://typesafe.ai) whether each test would fail if a statement it ran changed. `runs latest assertions assess` saves the answers (it needs `TYPESAFE_API_KEY`), and `runs latest assertions` then lists the statements no test checks, file by file. A statement that is not asserted runs in some test, but nothing that test checks depends on it. See [Assertion coverage](https://supercov.com/docs/assertions?language=rust). ## Rust-specific limits Supercov measures modules rustc compiles, not every `.rs` file in the directory. Const contexts and macro expansions have measurement limits. `cross` isn't supported. See [runner support](https://supercov.com/docs/supported-suites?language=rust#rust) for details. Already using cargo-llvm-cov or Tarpaulin? See [how the reports differ](https://supercov.com/compare/rust-code-coverage.md). `supercov docs coverage-model` prints the guide for your installed version.