- Build:
cargo build - Run:
cargo run - Test all:
cargo test - Test single:
cargo test test_name - Format:
cargo fmt - Lint:
cargo clippy
- Imports: Group by standard lib, external crates, then internal modules
- Error Handling: Use Result<T, ()> with match patterns for error handling
- Naming: Use snake_case for functions/variables, CamelCase for types/structs
- Types: Explicit type annotations for function signatures
- Constants: Use SCREAMING_SNAKE_CASE for constants
- Comments: Use /// for doc comments, // for implementation notes
- Formatting: Follow rustfmt conventions (4-space indentation)
- Functions: Keep functions small and focused on a single responsibility
- Error Messages: Use println! for info, eprintln! for errors