wolf-lang Public
Go to file
T
Code
Use Git or checkout with SVN using the web URL.
No matching headings.
Contributing to wolf
Commits
- Commit often, in chunks: one logical change per commit. Never
git add -A. - Messages: terse, imperative, under 250 characters.
- Tests land in the same commit as the code they test. Benchmarks land with the perf claims they prove.
Quality bars
cargo xtask cimust be green before pushing. It runscargo fmt --check,clippy -D warnings, and the workspace tests, then every verify lane in turn (deps-check,corpus,abi-check,debug-check, and the rest). The step list is theci()table inxtask/src/main.rs; a lane added there is a lane you have to pass.- The crate dependency direction is locked (see
Cargo.tomlandcargo xtask deps-check):span ← diag ← {lex, ast} ← parse ← sema ← mem ← wir ← backend ← codegen_* ← driver;wolf_rtmay depend onwolf_spanat most. - Every diagnostic gets a reviewed snapshot. A corpus surface change updates
corpus/in the same commit as the spec change, so the corpus never drifts from the locked surface (s02 discipline; review checklist item). - Diagnostic messages follow
crates/wolf_diag/VOICE.md, and a PR that adds or changes one quotes the guide in review. Every code needs a registry entry with a real explanation and at least one snapshot fixture;cargo xtask diag-cataloggates that. Compiler-phase crates never print (cargo xtask print-gate). - Platform-agnostic by default: code must not assume linux/x86-64. The CI matrix (linux x86-64/aarch64, macOS aarch64, windows x86-64, freebsd cross-build) is the arbiter.
Testing conventions
- Property tests use proptest. Case count follows
PROPTEST_CASES, which is small in PR CI and large in nightly CI. Exemplar:crates/wolf_span/tests/. - Snapshots use insta. Run
cargo insta reviewto update one deliberately; exemplar:xtask/tests/directive_snapshots.rs. - Benchmarks:
cargo xtask bench --track=<runtime|compile>emits JSONL tobench-results/.cargo xtask bench diff <base> <cand> [--gate]is the variance-aware comparison (median + 3×MAD noise floor, 2% practical floor, N≥10 runs). Reference kernels live inbench/kernels/. - Fuzz targets live in
fuzz/.cargo xtask fuzz-smokebuilds them where cargo-fuzz (nightly) is available, and skips loudly where it is not.
Toolchain
- Pinned in
rust-toolchain.toml(rustup/CI) andrust-version(everyone). Bump it in its own commit, with CI green.
Where the plan lives
.docs/(untracked): sprint plan, decision log, research reports. The sprint files under.docs/sprints/are the implementation contract; the decision log.docs/planning/02-decisions.mdis the design authority.