.me

rustdoc and docs.rs

Rust documentation has two layers:

  1. manual Markdown files in Rust/docs/,
  2. generated API reference from rustdoc.

docs.rs builds the second layer.

It does not automatically publish every Markdown file in Rust/docs/. It builds the crate and renders documentation from:

This crate wires its docs.rs front page through src/lib.rs:

#![doc = include_str!("../docs/API.md")]

That file is API.md.

To preview locally:

cargo doc --no-deps --open

The generated HTML lives under:

target/doc/this_me/

The public API reference for the published crate lives at:

https://docs.rs/this-me