Rust Engineering Guidelines
This section details the standards and best practices for Rust development at Dita. Our goal is to leverage Rust's safety guarantees while maintaining readable and maintainable code.
Core Principles
- Safety First: Avoid
unsafecode unless absolutely necessary and strictly isolated/documented. - Idiomatic Rust: Follow standard conventions. If "fighting the borrow checker", reconsider the design.
- Documentation: All public APIs must be documented.
Tooling
- Formatter: We use
rustfmtwith the standard configuration. - Linter: We use
clippy. CI pipelines should fail on clippy warnings.
Topics
- Project Structure (To be added)
- Error Handling (To be added)
- Testing (To be added)
- Async/Await (To be added)