src/main.rsis the application entry point; add new Rust modules undersrc/(one module per file, public APIs inmod.rsorlib.rsif introduced).tests/is the home for integration tests; unit tests live beside code under#[cfg(test)] mod tests.Cargo.tomldefines package metadata, edition (2024), and dependencies.GEMINI.mdcontains extended contributor/agent requirements (design, testing, commits).
cargo buildcompiles the project.cargo runruns the binary locally.cargo check --workspace --all-targets --all-featuresperforms fast type-checking.cargo fmt --all -- --checkvalidates formatting (required).cargo clippy --workspace --all-targets --all-features -- -D warningsruns linting (required).cargo test --workspace --all-featuresruns the test suite (required).
- Use
cargo fmt; Rust defaults apply (4-space indentation, trailing commas, etc.). - Naming:
snake_casefor modules/functions/vars,CamelCasefor types/traits,SCREAMING_SNAKE_CASEfor constants. - Keep functions small and single-purpose; avoid deep nesting and unclear abbreviations.
- Use Rust’s built-in test framework (
cargo test). - Add unit tests in-module and integration tests under
tests/(e.g.,tests/network_monitor.rs). - New or changed behavior should include success, failure, and edge-case coverage.
- No Git history exists yet; follow Conventional Commits in
GEMINI.md. - Header format:
type(scope): imperative summary(English, ≤72 chars, no period). - Non-trivial commits require a body with
- What:/- Why:bullets and aTests:line. - Configure Git authoring:
user.namemust beDennySORAand use a real email. - PRs should describe changes, list tests run, and link relevant issues; include screenshots for UI changes (if any).
- Do not commit secrets; prefer environment variables or local config files excluded by
.gitignore. - If you add new configuration, document it in
README.mdor a dedicateddocs/note.
- Automation should follow
GEMINI.mdfor required checks and commit rules.