Publish Rust crate API docs with the website - #1230
Conversation
📝 WalkthroughWalkthroughChangesCrate API documentation
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant PagesWorkflow
participant Justfile
participant BuildScript as build-crate-docs.sh
participant Rustdoc
participant PagesArtifact
PagesWorkflow->>Justfile: run crate-docs
Justfile->>BuildScript: invoke documentation build
BuildScript->>Rustdoc: build published crate documentation
Rustdoc-->>BuildScript: return generated docs
BuildScript->>PagesArtifact: copy docs/crates
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@website/src/crates/index.njk`:
- Line 11: Update the lead paragraph’s max-width utility in the crate index from
max-w-[42rem] to a value of 650px or less, while preserving its existing
typography and spacing classes.
🪄 Autofix
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: 0a5c1be1-c748-46dd-a226-00be2dda8976
📒 Files selected for processing (11)
.github/workflows/website-pages.yml.gitignoreAGENTS.mdJustfilescripts/build-crate-docs.shwebsite/AGENTS.mdwebsite/README.mdwebsite/scripts/clean-generated-site.mjswebsite/src/_data/crates.jswebsite/src/_data/docs.jswebsite/src/crates/index.njk
| <header class="docs-page-hero"> | ||
| <p class="eyebrow">Rust API</p> | ||
| <h1 class="text-balance font-display text-[clamp(2.5rem,12vw,5rem)] leading-[0.95] text-fg">Crate API reference</h1> | ||
| <p class="lead mt-4 max-w-[42rem] text-pretty text-base leading-7 text-muted sm:text-lg">Browse the current API surface for the crates Mesh LLM publishes to crates.io. For versioned documentation, use the docs.rs link on each crate.</p> |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Limit the Body Lead width to 650px.
Line 11 sets max-w-[42rem], which is 672px at the standard root font size. Set the maximum width to 650px or less.
Proposed fix
- <p class="lead mt-4 max-w-[42rem] text-pretty text-base leading-7 text-muted sm:text-lg">Browse the current API surface for the crates Mesh LLM publishes to crates.io. For versioned documentation, use the docs.rs link on each crate.</p>
+ <p class="lead mt-4 max-w-[650px] text-pretty text-base leading-7 text-muted sm:text-lg">Browse the current API surface for the crates Mesh LLM publishes to crates.io. For versioned documentation, use the docs.rs link on each crate.</p>As per coding guidelines, use “Body Lead with max-width 650px.”
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <p class="lead mt-4 max-w-[42rem] text-pretty text-base leading-7 text-muted sm:text-lg">Browse the current API surface for the crates Mesh LLM publishes to crates.io. For versioned documentation, use the docs.rs link on each crate.</p> | |
| <p class="lead mt-4 max-w-[650px] text-pretty text-base leading-7 text-muted sm:text-lg">Browse the current API surface for the crates Mesh LLM publishes to crates.io. For versioned documentation, use the docs.rs link on each crate.</p> |
🤖 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 `@website/src/crates/index.njk` at line 11, Update the lead paragraph’s
max-width utility in the crate index from max-w-[42rem] to a value of 650px or
less, while preserving its existing typography and spacing classes.
Source: Coding guidelines
What changed
The public website now publishes Rustdoc for every crate in the release workflow's crates.io publish list.
/crates/landing page with current API links and docs.rs links.scripts/publish-crates.sh.just crate-docsandjust website-buildbehavior.Validation
just website-buildcargo run -p xtask -- repo-consistency release-targetscargo run -p xtask -- repo-consistency ci-crate-listsactionlint .github/workflows/website-pages.ymljust --fmt --checkgit diff --checkRustdoc emits existing warnings in several crates, but generation completes successfully.
Summary by CodeRabbit
New Features
Documentation
Chores