Rust code-coverage in Emacs
December 10, 2025
After Shapr found cov (updated from cov.el) I once again attempted to make coverage appear in Emacs.
This time with success!
For a Rust project I’m currently working on, this means:
- run
cargo install cargo-llvm-cov - run your tests with the above, asking for “LCOV” ouput:
cargo llvm-cov --lcov > src/coverage.info - note the re-direct: you need to put a “
.info” file beside your “*.rs” files. - now, open e.g.
./src/lib.rsand doM-x cov-mode - this should find the coverage and use the “fringe” to colourize lines
txtorcon
carml
cuv’ner