Skip to content

Integrate wasmcov for WASM code coverage #130

@RAprogramm

Description

@RAprogramm

Problem

Currently, WASM-specific code is not included in coverage reports due to Rust tooling limitations:

  • cargo-llvm-cov only supports native platforms (x86_64)
  • wasm-bindgen-test coverage is experimental
  • cargo-tarpaulin does not support wasm32

This results in incomplete coverage metrics and a warning in README.

Solution

Integrate wasmcov - a specialized tool for WASM code coverage analysis developed by Hacken.

Implementation Plan

  1. Add wasmcov dependency

    • Add wasmcov = "0.2" to dev-dependencies
    • Add capture_coverage function to library
  2. Create dedicated CI job

    • Use nightly Rust toolchain (required by wasmcov)
    • Run cargo wasmcov test for WASM tests
    • Generate LLVM coverage reports
  3. Merge coverage reports

    • Keep existing cargo-llvm-cov for native code
    • Add wasmcov reports for WASM code
    • Combine in Codecov
  4. Update documentation

    • Remove coverage limitations warning from README
    • Update coverage metrics
    • Document wasmcov usage

Expected Outcomes

Technical Details

Closes #128

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions