Rust Rules
Cargo commands for building, testing, and publishing Rust projects. Manage dependencies and compile optimized binaries.
4 rules
Clippy Lint Compliance Required
All Rust code must pass Clippy with zero warnings — enable pedantic lints for library crates, address all suggestions, and configure project-wide lint levels in Cargo.toml.
Rust Error Handling Standards
Handle errors idiomatically in Rust — use Result and Option types, implement custom error types with thiserror, avoid unwrap/expect in libraries, and use anyhow for applications.
Rust Naming Conventions
Follow Rust's standard naming conventions — snake_case for functions and variables, PascalCase for types and traits, SCREAMING_SNAKE_CASE for constants, and meaningful crate names.
Unsafe Code Guidelines
Minimize and isolate unsafe code in Rust — document safety invariants, wrap unsafe in safe abstractions, require safety comments, and audit all unsafe blocks in code review.