T-P4LZ-reconcile-rust-toolchain-and-isolate-crates
Status: closed/done · Impact: high · Complexity: medium
Make pumice’s Rust crates compile under moon’s rust toolchain as an isolated
cargo unit under apps/pumice, and resolve the Rust version divergence between
pumice (pins 1.93.0 exact) and this workspace (tracks stable). This is the
polyglot proof D-0012-monorepo-tooling wanted — the rust toolchain
finally driving a real project.
.moon/toolchain.yml declares rust: stable but no project consumes it.
Pumice’s crates use relative path deps and a git dep on rust-ontogen pinned
by rev, and pumice’s mise.toml pins rust = 1.93.0 with a tauri-cli
postinstall.
| Fact | Source | Implication |
|---|---|---|
Workspace tracks stable | .moon/toolchain.yml | Divergence with pumice’s exact pin |
Pumice pins 1.93.0 + tauri-cli install | apps/pumice/mise.toml | Must relax or pin locally |
rust-ontogen git dep by rev | apps/pumice/src-tauri/Cargo.toml | Kept; needs network at build |
No workspace Cargo.toml | repo scan | Crates stay an isolated unit in Phase 1 |
Proposed
Section titled “Proposed”Build pumice’s crates as an isolated cargo unit (no workspace-wide Cargo.toml)
under moon’s rust toolchain, choosing one Rust version story: relax pumice to
stable, or pin apps/pumice locally via rust-toolchain.toml.
Approach
Section titled “Approach”- Confirm the crates build standalone. Run
cargo build/cargo clippy/cargo testforapps/pumice/src-tauriand thecrates/*; confirm therust-ontogengit dep resolves. - Resolve the version. Prefer relaxing pumice to
stable(aligns with the workspace); if pumice needs the exact toolchain, addapps/pumice/rust-toolchain.tomlpinning1.93.0so moon’srusttoolchain and CI honor it locally without forcing the whole workspace. - Wire the moon rust tasks. In
apps/pumice/moon.yml, expressrust-check/rust-test/rust-linttasks (clippy-D warnings,cargo fmt --check) under therust/systemtoolchain, mirroring pumice’sjustrecipes. - Decide
tauri-cliprovisioning. Pumice installstauri-clivia mise postinstall; decide whether moon/CI provisions it or the app keeps its mise step.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
apps/pumice/rust-toolchain.toml | new (conditional) | Local pin if 1.93.0 is required |
apps/pumice/mise.toml | edit | Relax/align the Rust version story |
apps/pumice/moon.yml | edit | Add rust check/test/lint tasks |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1:
cargo buildsucceeds for pumice’s crates as an isolated unit underapps/pumice(therust-ontogengit dep resolves). - AC-2: The Rust version divergence is resolved (relaxed to
stableor pinned locally) and documented. - AC-3:
moon run pumice:rust-check(clippy-D warnings) exits 0 under moon’srust/systemtoolchain. - AC-4:
moonbuilds bothapps/dashboard(TS) andapps/pumice(Rust) — the polyglot proof.
Out of scope
Section titled “Out of scope”- Promoting shared crates to
packages/rust—T-X8CF(Phase 2). - Codegen pipeline modeling —
T-R9WT. - CI system-dep provisioning —
T-T2HB.
Dependencies
Section titled “Dependencies”T-K3PN(hard): the vendored crates are what this builds.
Depends on
Section titled “Depends on”T-K3PN