Current state of code coverage in Rust - June 2023

There was a previous discussion at

What are the current options available for SaaS tracking of code coverage, and what are any gotchas?

I briefly used for private Rust projects on GitHub about 2 years ago, but have no experience with it on Public repos. Rust - Codecov links to GitHub - codecov/example-rust which is mostly 4 years old, and doesnt use the newer source-based code coverage . But looks like it does support it.

I've recently found out that doesnt support OSS with Pull Requests from forks. How to use DeepSource coverage on public repositories - Help Wanted - DeepSource Discuss

I also could find any documentation on whether coveralls supports token-less coverage uploads.

SonarCloud still doesnt support Rust. Add Rust language support - New rules / language support - Sonar Community

GitLab appears to be able to store code coverage directly in GitLab according to Test coverage visualization | GitLab . Does that work with Rust ?

Phabricator has an API for storing and retrieving coverage data per changeset, and ⚓ T13125 Plans: Code coverage reporting outlines their future plans.

Are there other SaaS for tracking coverage data? Especially any that support Rust?

I've been successfully able to set up code coverage reporting on public repositories with CodeCov. See my project dyn-iter for example. In particular, this piece of Gitlab CI seems to work for me.

  stage: test
  interruptible: true
    - rustup show
    - rustc --version
    - cargo --version
    - curl --location --output /tmp/tarpaulin.tar.gz
    - tar --extract --verbose --gzip --file /tmp/tarpaulin.tar.gz --directory /usr/local/bin/
    - cargo tarpaulin --version
    - cargo tarpaulin --all-features --workspace --out Xml
    - bash <(curl -s
    key: "${CI_COMMIT_REF_NAME}"
      - target/

I remember having tried to setup code coverage on Gitlab directly too, but without any success.


We use the following code in Ratatui to upload code coverage to in a github action using source based coverage

The resulting code coverage dashboard is at

Take a look at any recent PRs in our repo for details on how interacts Pull requests · tui-rs-revival/ratatui · GitHub to


Thanks to what was posted by @joshka, I've been able to adapt it in a more general scripting solution (to avoid dependency on Github Actions). In my case, it's Gitlab CI, but the script should be easily adaptable anywhere.

And coverage is available here (yes, coverage of this project is bad :stuck_out_tongue:).


This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.