Skip to content

ci(rust): add cargo fmt + clippy + test job for the workspace#957

Merged
esengine merged 1 commit into
mainfrom
rust-stage1-ci
May 15, 2026
Merged

ci(rust): add cargo fmt + clippy + test job for the workspace#957
esengine merged 1 commit into
mainfrom
rust-stage1-ci

Conversation

@esengine
Copy link
Copy Markdown
Owner

Locks the formatting and lint gates on the reasonix-render crate
before the next Rust PR adds anything substantial. Without this,
the Rust side drifts silently — JS contributors don't run cargo,
and the existing serde annotations are exactly the kind of code
where one missed rename rots the boundary.

What runs

  • `cargo fmt --all -- --check` — formatting matches what stable
    rustfmt produces.
  • `cargo clippy --all-targets -- -D warnings` — warnings are errors.
    No project-wide allowlist; suppressions live next to the code with
    a one-line reason.
  • `cargo test --manifest-path Cargo.toml` — runs the round-trip
    suite from feat(rust): reasonix-render crate skeleton with serde SceneFrame #953 at the workspace root. The Tauri shell at
    `desktop/src-tauri` (excluded workspace) is untouched.

Linux-only for now

macOS / Windows Rust runners cost real CI minutes. Today the crate
is serde + std; multi-OS rendering coverage matters once ratatui is
actually drawing things. Adding the matrix at that point is one
line.

Cosmetic fixes ride along

`cargo fmt` wants three wraps in the existing crate (`scene.rs` × 2,
`round_trip.rs` × 1) that the original PR didn't catch because there
was no CI to enforce it. Folded into this PR rather than a separate
fmt-only one — splitting would land a no-behavior-change diff with
no protection behind it.

Refs #868 #947

Locks in formatting and lint for the reasonix-render crate before
the second Rust PR adds anything substantial. Without this gate, the
Rust side drifts silently — JS contributors don't run cargo, and the
crate's existing serde annotations are exactly the kind of code
where one missed rename rots the boundary.

What runs:

- `cargo fmt --all -- --check` — formatting matches what rustfmt
  produces on stable.
- `cargo clippy --all-targets -- -D warnings` — warnings are errors.
  No clippy allowlist; if we want to silence something, the suppression
  goes next to the offending code with a one-line reason.
- `cargo test --manifest-path Cargo.toml` — the round-trip suite
  from #953. Tests run only at the workspace root, so the Tauri
  shell at `desktop/src-tauri` (its own excluded workspace) is
  untouched.

Linux-only for now. macOS and Windows runners come when actual
rendering work needs cross-platform terminal behavior gated; today
all the Rust code is serde + std and would just burn CI minutes
elsewhere.

Also applies rustfmt to the existing crate — two cosmetic line
wraps in `scene.rs` and one in `round_trip.rs` that `cargo fmt`
wants. The behavior change is zero; this is just the diff rustfmt
produces.

Refs #868 #947
@esengine esengine merged commit 15686e2 into main May 15, 2026
5 checks passed
@esengine esengine deleted the rust-stage1-ci branch May 15, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant