RUSTDOC(1)

NAME
rustdoc - generate documentation from Rust source code

SYNOPSIS
rustdoc [OPTIONS] CRATEFILE

DESCRIPTION
This tool generates API reference documentation by extracting comments from source code written in the Rust language, available at <https://www.rust- lang.org>. It provides several output formats for the generated documentation.

COMMANDS

--output-dir <val>
    Put documents here (default: .)

--output-format <val>
    markdown or html (default: html)

--output-style <val>
    doc-per-crate or doc-per-mod (default: doc-per-mod)

--pandoc-cmd <val>
    Command for running pandoc

-h, --help
    Print help

OUTPUT FORMATS
The rustdoc tool can generate documentation in either the Markdown or HTML formats. It requires the pandoc tool <http://johnmacfarlane.net/pandoc/> for conversion features.

EXAMPLES
To generate documentation for the source in the current directory:
    $ rustdoc hello.rs To build documentation into a subdirectory named 'doc' in the Markdown format:
    $ rustdoc --output-dir doc --output-format markdown hello.rs The generated HTML can be viewed with any standard web browser, while the Markdown version is well-suited for conversion into other formats.

SEE ALSO
rust, rustc, rustpkg, rusti

BUGS
See <https://github.com/mozilla/rust/issues> for issues.

AUTHOR
See AUTHORS.txt in the rust source distribution. Graydon Hoare <graydon@mozilla.com> is the project leader.

COPYRIGHT
This work is dual-licensed under Apache 2.0 and MIT terms. See COPYRIGHT file in the rust source distribution.