- Rust workspace with three crates under
src/crates/:primitives,pipeline, andheuristics. - Shared workspace configuration in
Cargo.tomlat the repo root. - Core pipeline logic lives in
src/crates/pipeline/src/, heuristic AST and rules insrc/crates/heuristics/src/, and ID/index primitives insrc/crates/primitives/src/. - Tests are colocated with code (e.g.,
src/crates/heuristics/src/ast/tests.rs).
cargo buildbuilds the entire workspace.cargo testruns all tests across crates.cargo test -p heuristicsruns the heuristics crate tests only.cargo fmtformats Rust code using rustfmt.cargo clippyruns Rust lints for the workspace.
- Rust 2024 edition; follow standard Rust style (4-space indentation, rustfmt defaults).
- Types use
CamelCase, functions/variables usesnake_case, and modules mirror file names. - Prefer generic ID families in pipeline/heuristics APIs (avoid concrete loose/dense types in AST nodes).
- Tests are written with Rust’s built-in test framework (
#[test]). - Place AST-specific tests under
src/crates/heuristics/src/ast/tests.rs. - Run targeted tests with
cargo test -p heuristicsduring AST changes.
- Recent commits use short, imperative summaries and often start with
WIP - .... - Keep commit messages concise and scoped to the change.
- For PRs, include a clear description, steps to reproduce/verify, and link related issues if available.