This file applies to the whole repository unless a deeper AGENTS.md overrides it.
- Use the repository Rust toolchain.
- Respect
rustfmt.tomland.clippy.toml. - Do not change toolchain or lint configuration unless explicitly required.
After every Rust code change, always run the following for the affected Cargo project:
cargo fmtcargo clippy
Do not finish with unformatted code. Do not finish without a clippy pass.
- Tests only need to cover the modified area.
- Do not run full-repository or full-workspace tests by default.
- Prefer the smallest effective scope:
- package-level tests
- module-related tests
- named tests
- integration tests related to the change
- Run broader tests only when the change affects shared infrastructure or multiple crates/projects.
- The repository root is the main Cargo workspace.
rocketmq-exampleis a standalone Cargo project and must be validated separately.rocketmq-dashboard/rocketmq-dashboard-gpuiis a standalone Cargo project and must be validated separately.rocketmq-dashboard/rocketmq-dashboard-tauriis not a Cargo workspace root.- The Rust backend for Tauri is in
rocketmq-dashboard/rocketmq-dashboard-tauri/src-tauriand must be validated there separately.
For changes inside the root workspace, run from the repository root:
cargo fmt --all
cargo clippy --workspace --no-deps --all-targets --all-features -- -D warningsTests should remain targeted. Example:
cargo test -p rocketmq-common
cargo test -p rocketmq-client
cargo test -p rocketmq-remoting some_test_nameRoot workspace validation does not cover standalone projects.
If changes affect any of the following, validate them in their own directories:
rocketmq-examplerocketmq-dashboard/rocketmq-dashboard-gpuirocketmq-dashboard/rocketmq-dashboard-tauri/src-tauri
If a shared crate is modified and that change can affect a standalone project, also validate the affected standalone project.
- Keep changes scoped to the task.
- Add or update tests when behavior changes.
- Prefer minimal targeted validation over broad validation.