feat(rust): scaffold workspace + parity harness (phase-0)
Bootstrap the Rust port of Headroom. Additive only — no existing Python
code modified. Ships the workshop, not the widgets.
Layout
Cargo.toml (workspace) + rust-toolchain.toml
crates/headroom-core — transform library, stub only
crates/headroom-proxy — axum binary, /healthz only
crates/headroom-py — PyO3 cdylib, exposes headroom._core.hello()
crates/headroom-parity — Rust-vs-Python oracle harness + parity-run CLI
Tooling
Makefile: test, test-parity, bench, build-proxy, build-wheel, fmt, lint
.github/workflows/rust.yml: test, wheels (linux/mac), audit, parity-nightly
deny.toml for cargo-deny
Parity corpus
tests/parity/recorder.py + scripts/record_fixtures.py
125 recorded fixtures across 5 leaf transforms (ccr, tokenizer,
log_compressor, diff_compressor, cache_aligner)
Docs
RUST_DEV.md — developer setup and workspace reference
docs/spec/022-rust-migration.md — migration plan and stage breakdown
.gitignore: whitelist scripts/record_fixtures.py; ignore target/
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 13:39:48 -07:00
|
|
|
[toolchain]
|
2026-04-27 12:11:49 -07:00
|
|
|
# Pin to a specific stable version so CI and local use the EXACT same
|
|
|
|
|
# compiler. With `channel = "stable"`, CI runners (dtolnay/rust-
|
|
|
|
|
# toolchain@stable) always grab the latest stable while local dev
|
|
|
|
|
# machines run whatever version was last installed — a clippy lint
|
|
|
|
|
# added in a newer stable then breaks CI without firing locally
|
|
|
|
|
# (this happened on 2026-04-27: `unnecessary_sort_by` landed in
|
|
|
|
|
# clippy 1.95 while a dev box had 1.92). Pinning makes "passes
|
|
|
|
|
# locally" = "passes in CI" for every check that depends on the
|
|
|
|
|
# toolchain.
|
|
|
|
|
#
|
|
|
|
|
# Bump procedure: edit the channel string here, run `rustup update`,
|
|
|
|
|
# run `make ci-precheck`, fix any new lints, commit.
|
|
|
|
|
channel = "1.95.0"
|
feat(rust): scaffold workspace + parity harness (phase-0)
Bootstrap the Rust port of Headroom. Additive only — no existing Python
code modified. Ships the workshop, not the widgets.
Layout
Cargo.toml (workspace) + rust-toolchain.toml
crates/headroom-core — transform library, stub only
crates/headroom-proxy — axum binary, /healthz only
crates/headroom-py — PyO3 cdylib, exposes headroom._core.hello()
crates/headroom-parity — Rust-vs-Python oracle harness + parity-run CLI
Tooling
Makefile: test, test-parity, bench, build-proxy, build-wheel, fmt, lint
.github/workflows/rust.yml: test, wheels (linux/mac), audit, parity-nightly
deny.toml for cargo-deny
Parity corpus
tests/parity/recorder.py + scripts/record_fixtures.py
125 recorded fixtures across 5 leaf transforms (ccr, tokenizer,
log_compressor, diff_compressor, cache_aligner)
Docs
RUST_DEV.md — developer setup and workspace reference
docs/spec/022-rust-migration.md — migration plan and stage breakdown
.gitignore: whitelist scripts/record_fixtures.py; ignore target/
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 13:39:48 -07:00
|
|
|
components = ["rustfmt", "clippy"]
|
|
|
|
|
profile = "minimal"
|