rscheck
rscheck checks Rust workspaces against layered project rules.
It covers rules that sit above compiler errors and default Clippy linting: architecture boundaries, API contracts, duplication thresholds, scoped overrides, and repo-specific constraints.
Site: https://xsyetopz.github.io/rscheck/
Install
That installs:
rscheckcargo-rscheck
Git install still works if you want the repo head instead of the published crate:
Check A Workspace
Initialize a policy file:
Run checks:
Choose a report format:
Preview edits:
Apply safe fixes:
Apply safe and unsafe fixes:
Pass extra cargo/clippy arguments after --:
Inspect rule metadata:
Configuration
rscheck reads .rscheck.toml from the workspace root. The v3 config uses
stable/nightly channel selection, adapters, dot-form rule IDs, and path-scoped overrides.
= 3
[]
= "auto"
= "stable"
= "nightly"
[]
= ["**/*.rs"]
= ["target/**", ".git/**"]
[]
= "text"
# output = "path/to/report.txt"
[]
= true
= "inherit"
= []
[]
= "deny"
= ["std", "core", "alloc", "crate"]
= true
= true
= true
[]
= "warn"
= "cyclomatic"
= 200
= 25
[]
= "deny"
= ["std::process::Command"]
[]
= "deny"
[]
= "warn"
[]
= "warn"
[[]]
= ["crates/rscheck-cli/**"]
[]
= 260
= 35
toolchain = "stable" runs stable syntax rules and the Clippy adapter.
toolchain = "nightly" requires a nightly cargo/rustc selector.
toolchain = "auto" uses nightly for semantic checks when available and
falls back to stable when semantic checks are not required.
semantic = "require" fails the run if the semantic backend is unavailable;
off disables semantic rules.
Rule Families
Current built-in families include:
architecture.*design.*shape.*portability.*testing.*perf.*pattern.*
Current rules include:
architecture.qualified_module_pathsarchitecture.banned_dependenciesarchitecture.layer_directiondesign.public_api_errorsdesign.repeated_type_aliasesdesign.naming_policydesign.god_objectshape.file_complexityshape.duplicate_logicshape.responsibility_splitportability.absolute_literal_pathstesting.external_test_modulesperf.hot_path_allocationspattern.custom
Use As A Library
The library crates are not published on crates.io yet.
[]
= { = "https://github.com/xsyetopz/rscheck" }
use Workspace;
use Policy;
use Runner;
use env;
let root = current_dir.unwrap;
let policy = default;
let ws = new.load_files.unwrap;
let report = run.unwrap;
println!;
Release
Manual release flow for the published crate family:
# Wait until crates.io can resolve rscheck-semantic.
# Wait until crates.io can resolve rscheck.
Verify the published package in a fresh environment:
Trusted publishing can be added later once the manual crates.io flow is settled.
Local Site
Build the Pages artifact locally: