Skip to content

Flatten workspace to single crate, split spatree out#27

Merged
nixonyh merged 2 commits into
mainfrom
flatten-workspace-split-spatree
Jun 13, 2026
Merged

Flatten workspace to single crate, split spatree out#27
nixonyh merged 2 commits into
mainfrom
flatten-workspace-split-spatree

Conversation

@nixonyh

@nixonyh nixonyh commented Jun 13, 2026

Copy link
Copy Markdown
Member

@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b451f38a-9af0-4519-a40f-7e899d22c696

📥 Commits

Reviewing files that changed from the base of the PR and between d225274 and 814a510.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • Cargo.toml
  • examples/layout_basic/main.rs
  • examples/layout_basic/vello_winit.rs
  • examples/vello_winit_examples/Cargo.toml
💤 Files with no reviewable changes (1)
  • examples/vello_winit_examples/Cargo.toml
🚧 Files skipped from review as they are similar to previous changes (1)
  • Cargo.toml

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Converted project from a workspace to individual crate manifests.
    • Removed the spatree crate and its public modules/implementations.
    • Updated CI workflow triggers and Rust job commands.
    • Removed several crate READMEs and adjusted example project manifests.
    • Modified an example to use a local module instead of the external example crate.

Walkthrough

Root Cargo.toml is converted from a workspace manifest to a single crate manifest for rectree; example crates switch from workspace inheritance to explicit package/dependency declarations; example code uses a local vello_winit module; CI workflow removes workspace flags and system library installation and narrows cargo commands.

Changes

Workspace to Single-Crate Migration

Layer / File(s) Summary
Cargo package and dev dependencies
Cargo.toml
Root manifest changed to a crate [package] and adds [dependencies]/[dev-dependencies] (bitflags, hashbrown, kurbo, vello, winit, pollster).
Example crate manifests
examples/vello_winit_examples/Cargo.toml
Example crate stops using workspace metadata and workspace dependency inheritance; package fields and dependencies are specified locally.
Example local module import
examples/layout_basic/main.rs
Example switches to a local mod vello_winit; and imports vello_winit::{VelloDemo, VelloWinitApp} instead of the external crate.
CI workflow simplification
.github/workflows/rust.yml
Adjusted on: trigger formatting; CI jobs (check, check-no-defaults, clippy, doc, test, doctest) drop --workspace, remove apt-get system installs, and run narrower cargo commands; doctest now runs cargo test --all-features --doc.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 In a tidy burrow, crates fold into one,
The spatree's leaves fall silent in sun,
CI hums simpler, examples call near,
A rabbit hops in — the path's crystal clear. 🥕

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess relevance to the changeset. Add a description explaining the rationale for flattening the workspace and how spatree is being split out or removed.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main structural change: converting a workspace to a single crate and removing spatree as a separate crate.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/rust.yml (1)

2-7: ⚠️ Potential issue | 🟠 Major

Harden CI workflow: pin actions, restrict token permissions, and disable checkout credential persistence.

  • No top-level permissions: block in .github/workflows/rust.yml.
  • Unpinned (non-SHA) uses: entries at lines 11-13, 20-22, 28-30, 36-38, 45-47, 55-57, 64-66 (actions/checkout@v4, dtolnay/rust-toolchain@stable, Swatinem/rust-cache@v2).
  • Each actions/checkout@v4 step at lines 11, 20, 28, 36, 45, 55, 64 is missing with: persist-credentials: false, increasing token exposure risk.
Suggested hardening pattern
+permissions:
+  contents: read
+
 jobs:
   format:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v4
+      - uses: actions/checkout@<full_commit_sha>
+        with:
+          persist-credentials: false
-      - uses: dtolnay/rust-toolchain@stable
+      - uses: dtolnay/rust-toolchain@<full_commit_sha>
-      - uses: Swatinem/rust-cache@v2
+      - uses: Swatinem/rust-cache@<full_commit_sha>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/rust.yml around lines 2 - 7, Add a top-level permissions
block and harden all external actions: add a minimal permissions block (e.g.,
permissions: contents: read) at the top of the workflow; pin every unpinned
action reference (actions/checkout@v4, dtolnay/rust-toolchain@stable,
Swatinem/rust-cache@v2, etc.) to an immutable commit SHA instead of a tag; and
for every actions/checkout step add with: persist-credentials: false to stop
checkout from persisting the GITHUB_TOKEN. These three changes together
(top-level permissions, pinning to SHAs, and persist-credentials: false on each
checkout) are the required fixes.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/rust.yml:
- Line 23: CI currently runs commands like "run: cargo check --all-features
--all-targets" only against the root crate, leaving
examples/vello_winit_examples outside validation; update each affected CI run
step that invokes cargo (the ones using "cargo check", "cargo build", or similar
run commands) to also run the same command against the standalone example crate
by either adding a separate step or appending a second command that uses
--manifest-path examples/vello_winit_examples/Cargo.toml (e.g., run: cargo check
--all-features --all-targets && cargo check --manifest-path
examples/vello_winit_examples/Cargo.toml --all-features --all-targets) so the
example crate is validated in the workflow.

---

Outside diff comments:
In @.github/workflows/rust.yml:
- Around line 2-7: Add a top-level permissions block and harden all external
actions: add a minimal permissions block (e.g., permissions: contents: read) at
the top of the workflow; pin every unpinned action reference
(actions/checkout@v4, dtolnay/rust-toolchain@stable, Swatinem/rust-cache@v2,
etc.) to an immutable commit SHA instead of a tag; and for every
actions/checkout step add with: persist-credentials: false to stop checkout from
persisting the GITHUB_TOKEN. These three changes together (top-level
permissions, pinning to SHAs, and persist-credentials: false on each checkout)
are the required fixes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 74f8ecb3-d1d6-4b41-93f0-ab763c517391

📥 Commits

Reviewing files that changed from the base of the PR and between c7eae45 and d225274.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (14)
  • .github/workflows/rust.yml
  • Cargo.toml
  • README.md
  • README.md
  • crates/rectree/Cargo.toml
  • crates/rectree/README.md
  • crates/spatree/Cargo.toml
  • crates/spatree/README.md
  • crates/spatree/src/lib.rs
  • crates/spatree/src/morton.rs
  • examples/vello_winit_examples/Cargo.toml
  • src/geom.rs
  • src/lib.rs
  • src/node.rs
💤 Files with no reviewable changes (6)
  • crates/rectree/Cargo.toml
  • crates/spatree/Cargo.toml
  • crates/spatree/README.md
  • crates/rectree/README.md
  • crates/spatree/src/morton.rs
  • crates/spatree/src/lib.rs

Comment thread .github/workflows/rust.yml
@nixonyh
nixonyh merged commit 93a3b02 into main Jun 13, 2026
8 checks passed
@nixonyh
nixonyh deleted the flatten-workspace-split-spatree branch June 13, 2026 09:04
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