rustdoc JSON → Fumadocs API pipeline
Status: Deferred — Phase 3; not started, no gen-rust-api.ts, no CI nightly step, no generated API pages exist yet; blocked on module contracts reaching sufficient //! coverage first
Shipped facts
Nothing has shipped. cargo doc HTML output is still never published — it lives in target/doc/ and is hard to navigate. The idea: replace cargo doc with a bun TypeScript build script that consumes rustdoc --output-format json and generates Fumadocs MDX pages under the contributor reference tree, so //! module contracts (once written) get a browsable, searchable home instead of an /internal/ route.
Intended pipeline:
cargo +nightly rustdoc --output-format json -p jackin --document-private-items
→ target/doc/jackin.json
→ docs/scripts/gen-rust-api.ts (new bun TypeScript script)
→ docs/content/docs/reference/developer-reference/api/<module>/<Item>.mdx (gitignored)Deliberately deferred behind module contracts: the pipeline's value scales with //! coverage, and that item's own 2026-07-01 audit still finds production crate files without leading //! docs.
Remaining work
- Build
docs/scripts/gen-rust-api.tsto turn rustdoc JSON into Fumadocs MDX pages underdocs/content/docs/reference/developer-reference/api/. - Decide scope: all
pubitems, orpubitems plus private items that carry//!////docs. - Decide the URL/IA shape under
/reference/developer-reference/api/— match it to whatever the contributor-reference IA looks like at implementation time, not the placeholder above. - Cross-link generated pages to behavioral specs (e.g. a type like
OpPickerStatelinking to its spec under/reference/developer-reference/specs/) once those specs have settled routes. - Add a nightly CI step (
dtolnay/rust-toolchain@nightly) isolated from the stablecheckjob, sincerustdoc --output-format jsonrequires nightly. - Gitignore generated MDX and regenerate on each
bun run build.
Related work
- Module contracts (//! docs) — prerequisite; this item should not start before that one reaches solid coverage.
- Developer Reference — the contributor reference tree the generated API pages would live under.