Skip to main content


Is anybody here extracting #RustLang code coverage as described in https://doc.rust-lang.org/rustc/instrument-coverage.html with https://github.com/mozilla/grcov inside a workspace? I get perfect coverage output for a single non-workspace crate, or for the top-level crate inside a workspace (Cargo.toml having [package] and [workspace] sections). All nested workspace members show zero coverage.
have you tried https://github.com/taiki-e/cargo-llvm-cov? It's worked well for me in workspaces so far
@romac Tried that and it worked, I'd prefer the "barebones" approach though, mainly because I prefer the html files rendered by grcov. Looks like I found the reason for my problems just now though. The LLVM_PROFILE_FILE seems to be used relative to the crate source path, so the .profraw files are not found by my grcov parameter. Making that an absolute path pattern works fine.
gotcha! good catch 😀
⇧