semverguard is a Rust orchestration layer around
cargo-semver-checks for Cargo workspaces.
It does not re-implement SemVer analysis. It selects packages, runs upstream checks, and normalizes outputs for CI.
Codecov is Rust execution-surface telemetry only; see Coverage for what the badge does and does not claim.
- Check every eligible workspace crate or only crates changed from a git baseline.
- Keep behavior in one config file:
semverguard.toml. - Emit text, JSON, SARIF, or receipt artifacts.
- Return CI-friendly exit codes.
| Crate | Responsibility |
|---|---|
semverguard-cli |
End-user CLI (semverguard) |
semverguard-core |
Reusable pipeline and reporting logic (config, receipt, SARIF, comments, exit codes) |
semverguard-domain |
Pure orchestration domain (SemverguardRunner) and port traits |
semverguard-types |
Shared schema types (config, workspace, engine, report, receipt) |
semverguard-workspace |
WorkspaceProvider adapter over cargo metadata |
semverguard-git |
GitProvider adapter over git CLI |
semverguard-engine |
SemverEngine adapter over cargo semver-checks check-release |
semverguard-integration-tests |
Workspace-level scenario and cucumber tests |
Install the upstream checker:
cargo install cargo-semver-checksRun a check from this workspace:
cargo run -p semverguard-cli -- check --json semverguard-report.jsonChanged-crate mode against a git baseline:
cargo run -p semverguard-cli -- check --changed --baseline-rev origin/mainPreview package selection without running checks:
cargo run -p semverguard-cli -- list --changed --baseline-rev origin/maincheck- run semver checkslist- show packages that would be checked/skippedprint-config- print effective configvalidate-config- validatesemverguard.tomlexplain- explain finding codespromote-baseline- resolve a ref and updatebaseline.rev
By default, semverguard reads ./semverguard.toml.
mode = "auto" # auto | pr | release | cockpit
[baseline]
kind = "git" # git | crates-io
rev = "origin/main"
[scope]
mode = "changed" # workspace | changed
include = []
exclude = []
skip_publish_false = true
skip_no_lib = true
[engine]
fail_fast = false
parallel = true
dry_run = false
extra_args = []
[output]
format = "both" # text | json | both | sarif | receipt
json_path = "semverguard-report.json"
pretty_json = true
artifacts_dir = "artifacts/semverguard"
warn_as_fail = false
color = "auto"
verbosity = "normal"0: success (or baseline warnings in lenient modes)1: tool/runtime error2: semver violation3: baseline error treated as failure
In mode = "cockpit" with receipt output, semverguard exits 0 when receipt writing succeeds.
- GitHub Action:
.github/actions/semverguard/action.yml - Install and pinning guide:
docs/src/how-to/install.md - Cockpit flow:
docs/src/how-to/cockpit-integration.md - Full docs index:
docs/src/index.md
Licensed under either Apache-2.0 or MIT.