-
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Problem
Currently, WASM-specific code is not included in coverage reports due to Rust tooling limitations:
cargo-llvm-covonly supports native platforms (x86_64)wasm-bindgen-testcoverage is experimentalcargo-tarpaulindoes 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
-
Add wasmcov dependency
- Add
wasmcov = "0.2"to dev-dependencies - Add capture_coverage function to library
- Add
-
Create dedicated CI job
- Use nightly Rust toolchain (required by wasmcov)
- Run
cargo wasmcov testfor WASM tests - Generate LLVM coverage reports
-
Merge coverage reports
- Keep existing cargo-llvm-cov for native code
- Add wasmcov reports for WASM code
- Combine in Codecov
-
Update documentation
- Remove coverage limitations warning from README
- Update coverage metrics
- Document wasmcov usage
Expected Outcomes
- Coverage metrics will include WASM-only modules
- True coverage should reach 95%+ target
- Close issue WASM code testing and coverage strategy #128
Technical Details
- Tool: https://github.com/hknio/wasmcov
- Requires: nightly Rust, LLVM tools
- Used by: Radix, NEAR Protocol
Closes #128
Metadata
Metadata
Assignees
Labels
No labels