md-docrs is a CLI that renders docs.rs rustdoc JSON as Markdown.
It lets you query a crate, module, type, trait, function, or other documented item with a compact spec:
crate[@version][::path::to::item]
Run the CLI directly from the workspace:
cargo run -p md-docrs-cli -- anyhow
cargo run -p md-docrs-cli -- anyhow::Error
cargo run -p md-docrs-cli -- tokio::sync::Mutex
cargo run -p md-docrs-cli -- tokio@1.52.1::sync::Mutex
cargo run -p md-docrs-cli -- --target x86_64-unknown-linux-gnu tokio::sync::MutexOutput is written to stdout as Markdown.
This repository is a Rust workspace centered on the md-docrs CLI, plus related server, worker, and WASM targets for some explorative work on wasm and zig.
crates/md-docrs-cli— themd-docrscommand-line toolcrates/md-docrs-core— spec parsing, docs.rs resolution, rendering, and cache abstractionscrates/md-docrs-fetch-http— native HTTP fetcher for docs.rs rustdoc JSONcrates/md-docrs-server— native HTTP server that serves Markdowncrates/md-docrs-worker— Cloudflare Worker for a hosted HTTP versioncrates/md-docrs-rust-wasm— Rust WASM export layercrates/md-docrs-wasm-compare— host-side comparison harness for WASM builds
zig/— minimal Zig URL-resolution implementation for fun and compare WASM sizewasm/— WASM artifacts and comparison build flow
There is also a Cloudflare Worker-based hosted path in crates/md-docrs-worker.
Ongoing work!
This repository is configured thanks to cargo-dist and cargo-release