make check— runs fmt-check + clippy + all tests. Must pass before considering any task complete.make build— compile release binary to.bin/cargo fmt --all— format all code. Run after every code change.cargo clippy --all-targets --all-features -- -D warnings— zero warnings required.cargo test --all-features— run all tests.
- All code must pass
cargo fmt --check(rustfmt default: 100-column line width). - Break long function signatures, macro calls, and chained method calls across multiple lines to stay within 100 columns.
- Follow existing naming patterns:
_with_limit/_with_*suffix for configurable-parameter variants that delegate from a simpler public API.- Public wrapper functions (e.g.,
build_module_command) delegate to_with_limitvariants with default constants.
#[allow(dead_code)]only when the field is intentionally kept for API symmetry.- Error types use
thiserror::Errorderive. - Tests live in
#[cfg(test)] mod testswithin each source file, plus integration tests intests/.
- Spec repo (single source of truth):
../apcore-cli/docs/ - Python reference implementation:
../apcore-cli-python/ - All values in
ConfigResolver::DEFAULTSare&str(not typed) — callers parse as needed. - Exit codes are
pub constinlib.rs, matching the protocol spec. apdev-rs check-charsis part ofmake check— no non-ASCII characters in source files.
- Rust edition: 2021
- MSRV: 1.75+
- Async runtime: tokio