Contributing
The build gate
There is no hosted CI. A single recipe is the gate and must be green before every commit:
just ci
just ci runs, in order: formatting check, Clippy with warnings denied across all
targets, the test suite (nextest) and doctests, a documentation build with broken
links denied, a WebAssembly build, cargo-deny for licenses and advisories, and a
spell check. Individual steps are available as their own recipes (just fmt,
just clippy, just test, just doc-build, and so on); just --list shows them
all.
Standards
- Exact integers. Layout coordinates are database units (
i32); widen toi64/i128for products and areas. Never introduce floating-point coordinates into the geometry or model core. - Documented public API. Every public item carries rustdoc; this is enforced.
- Safe Rust by default. Any
unsafeis isolated, carries a// SAFETY:justification, and is covered by tests andmiri(just miri). - Tests before claims. New geometry, indices, and CRDT behavior come with
property tests against a brute-force or reference oracle; parsers come with fuzz
targets (
just fuzz <target>); the renderer comes with golden-image tests. - Measured performance. A change that affects performance lands with a
benchmark and a real number recorded in
PERF.md;xtask perf-checkguards against regressions. - Decisions are recorded. A choice with real trade-offs gets a short
architecture decision record under
docs/decisions/.
Commits
Commits are small, coherent, and use conventional messages.
Before your first commit in a fresh clone, run this once:
git config core.hooksPath .githooks
git clone never sets it, because core.hooksPath is per-clone local config. Until you
run it, the pre-commit hook (fast formatting and Clippy checks) and the commit-msg hook
(the AI-attribution guard) do not run at all, and just check-hook-path fails. This was
measured red-then-green on a genuinely fresh clone on 2026-07-29; it had been documented
only as a parenthetical, never as a step.