Expand description
memex: Generate mdBook-ready Markdown from rustdoc JSON.
Transforms rustdoc JSON output into structured Markdown files for mdBook.
§Quick Start
-
Generate rustdoc JSON:
cargo +nightly rustdoc --lib -- -Z unstable-options --output-format json -
Create
memex.toml:[[targets]] crate = "my_crate" out = "api/my_crate" layout = "module-tree" -
Generate docs:
use memex::{parse_targets_toml, render_targets}; use std::{fs, path::Path}; let toml = fs::read_to_string("docs/memex.toml")?; let targets = parse_targets_toml( Path::new("."), Path::new("docs"), Path::new("target/doc"), &toml, )?; let docs = render_targets(&targets)?; // Write docs.files to disk...
§Layouts
module-tree: Per-item pages in nested directories (like rustdoc)module-single: One page per module with grouped sections
Re-exports§
pub use config::parse_targets_toml;pub use pipeline::build_site;pub use pipeline::build_site_with_config_path;
Modules§
- agents
- Tools for constructing agent-facing documentation bundles and helpers.
- config
- Parsing and normalization logic for
memex.toml. - error
- Error types used across the pipeline. Error types for memex.
- pipeline
- High-level orchestration pipeline for building documentation with memex.
Structs§
- Generated
Docs - Complete documentation output including all files and SUMMARY.md fragment.
- Generated
File - A generated documentation file with its relative path and content.
- Target
Spec - A configurable rendering target.
Enums§
- Layout
- Layout strategy per target.
Constants§
- GENERATED_
BANNER - Marker inserted at the top of generated Markdown files.
Functions§
- render_
targets - Render Markdown documentation from configured targets.
- scan_
targets - Auto-discover rustdoc JSON files and create targets.