1 .TH RUSTDOC "1" "March 2014" "rustdoc 0.12.0-pre" "User Commands"
3 rustdoc \- generate documentation from Rust source code
6 [\fIOPTIONS\fR] \fIINPUT\fR
9 This tool generates API reference documentation by extracting comments from
10 source code written in the Rust language, available at
11 <\fBhttps://www.rust-lang.org\fR>. It accepts several input formats and provides
12 several output formats for the generated documentation.
17 -r --input-format <val>
18 html or json (default: inferred)
20 -w --output-format <val>
21 html or json (default: html)
24 where to place the output (default: doc/ for html, doc.json for json)
27 space-separated list of passes to run (default: '')
30 don't run the default passes
33 space-separated list of plugins to run (default: '')
36 directory to load plugins from (default: /tmp/rustdoc_ng/plugins)
38 -L --library-path <val>
39 directory to add to crate search path
41 --html-in-header <val>
44 --html-before-content <val>
45 file to add in <body>, before content
47 --html-after-content <val>
48 file to add in <body>, after content
55 The rustdoc tool can generate output in either an HTML or JSON format.
57 If using an HTML format, then the specified output destination will be the root
58 directory of an HTML structure for all the documentation. Pages will be placed
59 into this directory, and source files will also possibly be rendered into it as
62 If using a JSON format, then the specified output destination will have the
63 rustdoc output serialized as JSON into it. This output format exists to
64 pre-compile documentation for crates, and for usage in non-rustdoc tools. The
65 JSON output is the following hash:
73 The schema version indicates what the structure of crate/plugins will look
74 like. Within a schema version the structure will remain the same. The `crate`
75 field will contain all relevant documentation for the source being documented,
76 and the `plugins` field will contain the output of the plugins run over the
81 To generate documentation for the source in the current directory:
84 List all available passes that rustdoc has, along with default passes:
85 $ rustdoc --passes list
87 To precompile the documentation for a crate, and then use it to render html at
89 $ rustdoc -w json hello.rs
92 The generated HTML can be viewed with any standard web browser.
99 See <\fBhttps://github.com/rust-lang/rust/issues\fR> for issues.
102 See \fBAUTHORS.txt\fR in the Rust source distribution.
105 This work is dual-licensed under Apache 2.0 and MIT terms. See \fBCOPYRIGHT\fR
106 file in the rust source distribution.