Files
gps-denied-onboard/.cursor/rules/rust.mdc
T
Oleksandr Bezdieniezhnykh 1f634c2604
ci/woodpecker/push/02-build-push Pipeline failed
Update demo replay validation and testing documentation
- Modified the autodev state to reflect the current testing phase and details of the new `jetson-e2e` tests.
- Enhanced the "How to Test" documentation to provide clearer instructions on the demo replay validation process, including video and tlog alignment steps.
- Updated architectural documentation to include the new demo replay operator flow and its dependencies.
- Documented the removal of deprecated auto-sync features and clarified the operator-facing UI for replay validation.
- Added new entries in the dependencies table for upcoming tasks related to the demo replay flow.

These changes improve clarity and usability for operators and developers working with the demo replay system.
2026-06-20 11:24:43 +03:00

18 lines
1.1 KiB
Plaintext

---
description: "Rust coding conventions: error handling with Result/thiserror/anyhow, ownership patterns, clippy, module structure"
globs: ["**/*.rs", "**/Cargo.toml", "**/Cargo.lock"]
---
# Rust
- Use `Result<T, E>` for recoverable errors; `panic!` only for unrecoverable
- Use `?` operator for error propagation; define custom error types with `thiserror`; use `anyhow` for application-level errors
- Prefer references over cloning; minimize unnecessary allocations
- Never use `unwrap()` in production code; use `expect()` with descriptive message or proper error handling
- Minimize `unsafe`; document invariants when used; isolate in separate modules
- Use `Arc<Mutex<T>>` for shared mutable state; prefer channels (`mpsc`) for message passing
- Use `clippy` and `rustfmt`; treat clippy warnings as errors in CI
- Module structure: `src/main.rs` or `src/lib.rs` as entry; submodules in separate files
- Use `#[cfg(test)]` module for unit tests; `tests/` directory for integration tests
- Use feature flags for conditional compilation
- Use `serde` for serialization with `derive` feature