Skip to content

Publish Rust crate API docs with the website - #1230

Merged
i386 merged 1 commit into
mainfrom
feat/publish-crate-docs
Aug 11, 2026
Merged

Publish Rust crate API docs with the website#1230
i386 merged 1 commit into
mainfrom
feat/publish-crate-docs

Conversation

@i386

@i386 i386 commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

What changed

The public website now publishes Rustdoc for every crate in the release workflow's crates.io publish list.

  • Adds a /crates/ landing page with current API links and docs.rs links.
  • Generates Rustdoc from the same publish list used by scripts/publish-crates.sh.
  • Includes generated docs in the GitHub Pages artifact and removes stale output during clean builds.
  • Rebuilds the website when published crate sources or Cargo metadata change.
  • Documents the new just crate-docs and just website-build behavior.

Validation

  • just website-build
  • cargo run -p xtask -- repo-consistency release-targets
  • cargo run -p xtask -- repo-consistency ci-crate-lists
  • actionlint .github/workflows/website-pages.yml
  • just --fmt --check
  • git diff --check

Rustdoc emits existing warnings in several crates, but generation completes successfully.

Summary by CodeRabbit

  • New Features

    • Added a crate API reference section to the website.
    • Added a developer documentation link and responsive crate listing.
    • Included generated Rust API documentation for published crates in website builds.
  • Documentation

    • Updated website and build documentation with crate API reference instructions.
  • Chores

    • Improved website build automation, including Rust documentation generation and extended build timeouts.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Crate API documentation

Layer / File(s) Summary
Crate documentation generation
Justfile, scripts/build-crate-docs.sh, .gitignore, website/scripts/clean-generated-site.mjs
The build creates locked Rustdoc for published crates and manages docs/crates/ as generated output.
Website crate reference
website/src/_data/crates.js, website/src/crates/index.njk, website/src/_data/docs.js, website/README.md, website/AGENTS.md
The website builds a crate reference page from the published crate list and links to local Rustdoc and docs.rs.
Pages deployment integration
.github/workflows/website-pages.yml, AGENTS.md
The Pages workflow installs Rust and Just, runs crate documentation generation, tracks crate changes, and stages docs/crates/.

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
Loading

Possibly related PRs

  • Mesh-LLM/mesh-llm#973: Both PRs extend the Developers documentation navigation in website/src/_data/docs.js.

Suggested reviewers: ndizazzo, michaelneale

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: publishing Rust crate API documentation with the website.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/publish-crate-docs

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7505791 and d6af776.

📒 Files selected for processing (11)
  • .github/workflows/website-pages.yml
  • .gitignore
  • AGENTS.md
  • Justfile
  • scripts/build-crate-docs.sh
  • website/AGENTS.md
  • website/README.md
  • website/scripts/clean-generated-site.mjs
  • website/src/_data/crates.js
  • website/src/_data/docs.js
  • website/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>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 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.

Suggested change
<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

@i386
i386 merged commit bdd0beb into main Aug 11, 2026
38 checks passed
@i386
i386 deleted the feat/publish-crate-docs branch August 11, 2026 01:20
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