Skip to content

Commit e75c354

Browse files
committed
feat: initial commit
0 parents  commit e75c354

34 files changed

Lines changed: 3107 additions & 0 deletions

.github/workflows/ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: dtolnay/rust-toolchain@stable
18+
- uses: Swatinem/rust-cache@v2
19+
- run: cargo test --locked --all-targets

.github/workflows/release.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: dtolnay/rust-toolchain@stable
17+
- uses: Swatinem/rust-cache@v2
18+
- run: cargo test --locked --all-targets
19+
20+
build:
21+
needs: test
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
include:
26+
## macOS: aarch64, x86_64
27+
- target: aarch64-apple-darwin,
28+
os: macos-latest
29+
- target: x86_64-apple-darwin,
30+
os: macos-latest
31+
## Linux:
32+
## Linux: aarch64, x86_64
33+
- target: aarch64-unknown-linux-gnu
34+
os: ubuntu-latest
35+
- target: aarch64-unknown-linux-musl,
36+
os: ubuntu-latest
37+
- target: x86_64-unknown-linux-gnu,
38+
os: ubuntu-latest
39+
- target: x86_64-unknown-linux-musl
40+
os: ubuntu-latest
41+
## Windows: x86_64
42+
- target: x86_64-pc-windows-msvc,
43+
os: windows-latest
44+
- target: x86_64-pc-windows-gnu
45+
os: windows-latest
46+
# FreeBSD: x86_64
47+
- target: x86_64-unknown-freebsd
48+
os: ubuntu-latest
49+
runs-on: ${{ matrix.os }}
50+
steps:
51+
- uses: actions/checkout@v4
52+
- uses: dtolnay/rust-toolchain@stable
53+
with:
54+
targets: ${{ matrix.target }}
55+
- uses: Swatinem/rust-cache@v2
56+
- run: cargo build --release --locked --target ${{ matrix.target }}
57+
58+
- name: Prepare dist
59+
shell: bash
60+
run: |
61+
mkdir -p dist
62+
cp "target/${{ matrix.target }}/release/diff-coverage" dist/
63+
cp README.md dist/
64+
65+
- name: Package (tar.gz)
66+
if: runner.os != 'Windows'
67+
shell: bash
68+
run: |
69+
archive="diff-cover-${{ github.ref_name }}-${{ matrix.target }}.tar.gz"
70+
tar -czf "$archive" -C dist .
71+
echo "archive=$archive" >> "$GITHUB_OUTPUT"
72+
73+
- name: Package (zip)
74+
if: runner.os == 'Windows'
75+
shell: pwsh
76+
run: |
77+
$archive = "diff-cover-${{ github.ref_name }}-${{ matrix.target }}.zip"
78+
Compress-Archive -Path dist\* -DestinationPath $archive
79+
"archive=$archive" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
80+
81+
- name: Upload release assets
82+
uses: softprops/action-gh-release@v2
83+
with:
84+
files: |
85+
diff-cover-${{ github.ref_name }}-${{ matrix.target }}.*

.gitignore

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Generated by Cargo
2+
# will have compiled files and executables
3+
debug
4+
target
5+
6+
# These are backup files generated by rustfmt
7+
**/*.rs.bk
8+
9+
# MSVC Windows builds of rustc generate these, which store debugging information
10+
*.pdb
11+
12+
# Generated by cargo mutants
13+
# Contains mutation testing data
14+
**/mutants.out*/
15+
16+
# RustRover
17+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
18+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
19+
# and can be added to the global gitignore or merged into this file. For a more nuclear
20+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
21+
.idea/
22+
# Covers JetBrains IDEs: IntelliJ, GoLand, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
23+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
24+
25+
# User-specific stuff
26+
.idea/**/workspace.xml
27+
.idea/**/tasks.xml
28+
.idea/**/usage.statistics.xml
29+
.idea/**/dictionaries
30+
.idea/**/shelf
31+
32+
# AWS User-specific
33+
.idea/**/aws.xml
34+
35+
# Generated files
36+
.idea/**/contentModel.xml
37+
38+
# Sensitive or high-churn files
39+
.idea/**/dataSources/
40+
.idea/**/dataSources.ids
41+
.idea/**/dataSources.local.xml
42+
.idea/**/sqlDataSources.xml
43+
.idea/**/dynamic.xml
44+
.idea/**/uiDesigner.xml
45+
.idea/**/dbnavigator.xml
46+
47+
# Gradle
48+
.idea/**/gradle.xml
49+
.idea/**/libraries
50+
51+
# Gradle and Maven with auto-import
52+
# When using Gradle or Maven with auto-import, you should exclude module files,
53+
# since they will be recreated, and may cause churn. Uncomment if using
54+
# auto-import.
55+
# .idea/artifacts
56+
# .idea/compiler.xml
57+
# .idea/jarRepositories.xml
58+
# .idea/modules.xml
59+
# .idea/*.iml
60+
# .idea/modules
61+
# *.iml
62+
# *.ipr
63+
64+
# CMake
65+
cmake-build-*/
66+
67+
# Mongo Explorer plugin
68+
.idea/**/mongoSettings.xml
69+
70+
# File-based project format
71+
*.iws
72+
73+
# IntelliJ
74+
out/
75+
76+
# mpeltonen/sbt-idea plugin
77+
.idea_modules/
78+
79+
# JIRA plugin
80+
atlassian-ide-plugin.xml
81+
82+
# Cursive Clojure plugin
83+
.idea/replstate.xml
84+
85+
# SonarLint plugin
86+
.idea/sonarlint/
87+
.idea/sonarlint.xml # see https://community.sonarsource.com/t/is-the-file-idea-idea-idea-sonarlint-xml-intended-to-be-under-source-control/121119
88+
89+
# Crashlytics plugin (for Android Studio and IntelliJ)
90+
com_crashlytics_export_strings.xml
91+
crashlytics.properties
92+
crashlytics-build.properties
93+
fabric.properties
94+
95+
# Editor-based HTTP Client
96+
.idea/httpRequests
97+
http-client.private.env.json
98+
99+
# Android studio 3.1+ serialized cache file
100+
.idea/caches/build_file_checksums.ser
101+
102+
# Apifox Helper cache
103+
.idea/.cache/.Apifox_Helper
104+
.idea/ApifoxUploaderProjectSetting.xml
105+
106+
# Github Copilot persisted session migrations, see: https://github.com/microsoft/copilot-intellij-feedback/issues/712#issuecomment-3322062215
107+
.idea/**/copilot.data.migration.*.xml
108+
109+
.rustc_info.json

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# 0.1.0 - 2026-01-29
2+
3+
We're excited to ship the very first release of diff-coverage, a developer‑focused CLI that makes coverage on changed code
4+
fast, reliable, and CI‑friendly. Built for teams who want actionable coverage signals without slow or unreliable pipelines.
5+
6+
What's new
7+
- Blazing‑fast runs: up to ~108× faster mean wall‑time vs Python diff‑cover in larger runs
8+
- Memory‑efficient processing: ~21–28× lower peak RSS memory usage
9+
- Coverage directories supported: point to directories (not just single files) for flexible CI setups
10+
- `--fail-under` support: enforce quality gates directly in your pipeline
11+
12+
Why it matters diff-coverage is designed for modern dev workflows—fast enough for tight inner loops, strict enough for
13+
CI, and predictable across mono‑repos and multi‑coverage setups.
14+
15+
Thanks for being part of the very first release — more to come!

0 commit comments

Comments
 (0)