What problem does it solve?
Encode API-design discipline and catch high-signal Rust mistakes before they land in the native Rust workspace. Apply these rules when authoring or reviewing public (pub) and crate-public (pub(crate)) function signatures, struct definitions, and trait bounds anywhere in the workspace, and during code review, pre-merge self-check, and when tightening existing code.
Core Features & Use Cases
- API Design Rules: Enforce borrowed args over owned references, avoid lifetime infections, and use HRTB-shaped callbacks for safety.
- Anti-Patterns & Risk Mitigation: Provide guidance on panic discipline, error propagation, Drop/RAII, and aliasing issues to reduce bugs.
- Use Case: As a code reviewer, apply these rules to a diff to prevent subtle API regressions.
Quick Start
Run the Rust discipline checks on your codebase and integrate into the PR review process to improve API safety.