653 B
653 B
Agent Instructions
Build, Lint, and Test
- Build:
cargo build - Lint:
cargo clippy - Test:
cargo test - Run a single test:
cargo test --test <test_name>
Code Style
- Formatting: Use
cargo fmtto format the code. - Imports: Group imports by standard library, external crates, and project modules.
- Types: Use explicit types.
- Naming Conventions: Follow Rust's naming conventions (e.g.,
snake_casefor variables and functions,PascalCasefor types). - Error Handling: Use
Resultand?for error propagation. Usepanic!only for unrecoverable errors. - Logging: Use the
logcrate for logging.