2017-05-23 21:22:51 +02:00
|
|
|
.TH RUSTDOC "1" "May 2017" "rustdoc 1.19.0" "User Commands"
|
2013-07-07 06:06:54 +02:00
|
|
|
.SH NAME
|
|
|
|
rustdoc \- generate documentation from Rust source code
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B rustdoc
|
2013-09-30 22:28:30 +02:00
|
|
|
[\fIOPTIONS\fR] \fIINPUT\fR
|
2013-07-07 06:06:54 +02:00
|
|
|
|
|
|
|
.SH DESCRIPTION
|
|
|
|
This tool generates API reference documentation by extracting comments from
|
2013-09-30 22:28:30 +02:00
|
|
|
source code written in the Rust language, available at
|
2016-02-06 06:32:47 +01:00
|
|
|
<\fBhttps://www.rust-lang.org\fR>. It accepts several input formats and
|
|
|
|
provides several output formats for the generated documentation.
|
2013-07-07 06:06:54 +02:00
|
|
|
|
2013-09-30 22:28:30 +02:00
|
|
|
.SH OPTIONS
|
2013-07-07 06:06:54 +02:00
|
|
|
|
|
|
|
.TP
|
2015-02-26 10:10:17 +01:00
|
|
|
\fB\-r\fR, \fB\-\-input\-format\fR \fIFORMAT\fR
|
2017-05-23 21:22:51 +02:00
|
|
|
rust
|
2013-07-07 06:06:54 +02:00
|
|
|
.TP
|
2015-02-26 10:10:17 +01:00
|
|
|
\fB\-w\fR, \fB\-\-output\-format\fR \fIFORMAT\fR
|
2017-05-23 21:22:51 +02:00
|
|
|
html
|
2013-07-07 06:06:54 +02:00
|
|
|
.TP
|
2017-05-23 21:22:51 +02:00
|
|
|
\fB\-o\fR, \fB\-\-output\fR \fIOUTPUT\fR,
|
|
|
|
where to place the output (default: \fIdoc/\fR for html)
|
2013-07-07 06:06:54 +02:00
|
|
|
.TP
|
2015-02-26 10:10:17 +01:00
|
|
|
\fB\-\-passes\fR \fILIST\fR
|
|
|
|
space\[hy]separated list of passes to run (default: '')
|
2013-09-30 22:28:30 +02:00
|
|
|
.TP
|
2015-02-26 10:10:17 +01:00
|
|
|
\fB\-\-no\-defaults\fR
|
2013-09-30 22:28:30 +02:00
|
|
|
don't run the default passes
|
|
|
|
.TP
|
2015-02-26 10:10:17 +01:00
|
|
|
\fB\-\-plugins\fR \fILIST\fR
|
2013-09-30 22:28:30 +02:00
|
|
|
space-separated list of plugins to run (default: '')
|
|
|
|
.TP
|
2015-02-26 10:10:17 +01:00
|
|
|
\fB\-\-plugin\-path\fR \fIDIR\fR
|
|
|
|
directory to load plugins from (default: \fI/tmp/rustdoc_ng/plugins\fR)
|
2013-09-30 22:28:30 +02:00
|
|
|
.TP
|
2015-02-26 10:10:17 +01:00
|
|
|
\fB\-\-target\fR \fITRIPLE\fR
|
2015-01-17 20:45:59 +01:00
|
|
|
target triple to document
|
|
|
|
.TP
|
2015-02-26 10:10:17 +01:00
|
|
|
\fB\-\-crate\-name\fR \fINAME\fR
|
2015-01-17 20:45:59 +01:00
|
|
|
specify the name of this crate
|
|
|
|
.TP
|
2015-02-26 10:10:17 +01:00
|
|
|
\fB\-L\fR, \fB\-\-library\-path\fR \fIDIR\fR
|
2013-09-30 22:28:30 +02:00
|
|
|
directory to add to crate search path
|
2013-07-07 06:06:54 +02:00
|
|
|
.TP
|
2015-02-26 10:10:17 +01:00
|
|
|
\fB\-\-cfg\fR \fISPEC\fR
|
|
|
|
pass a \fI\-\-cfg\fR to rustc
|
2015-01-17 20:45:59 +01:00
|
|
|
.TP
|
2015-02-26 10:10:17 +01:00
|
|
|
\fB\-\-extern\fR \fIVAL\fR
|
|
|
|
pass an \fI\-\-extern\fR to rustc
|
2015-01-17 20:45:59 +01:00
|
|
|
.TP
|
2015-02-26 10:10:17 +01:00
|
|
|
\fB\-\-test\fR
|
2015-01-17 20:45:59 +01:00
|
|
|
run code examples as tests
|
|
|
|
.TP
|
2015-02-26 10:10:17 +01:00
|
|
|
\fB\-\-test\-args\fR \fIARGS\fR
|
2015-01-17 20:45:59 +01:00
|
|
|
pass arguments to the test runner
|
|
|
|
.TP
|
2015-02-26 10:10:17 +01:00
|
|
|
\fB\-\-html\-in\-header\fR \fIFILE\fR
|
2014-06-28 12:35:25 +02:00
|
|
|
file to add to <head>
|
|
|
|
.TP
|
2017-05-23 21:22:51 +02:00
|
|
|
\fB\-\-html\-before\-content\fR \fIFILES\fR
|
|
|
|
files to include inline between <body> and the content of a rendered Markdown
|
|
|
|
file or generated documentation
|
2014-06-28 12:35:25 +02:00
|
|
|
.TP
|
2017-05-23 21:22:51 +02:00
|
|
|
\fB\-\-markdown\-before\-content\fR \fIFILES\fR
|
|
|
|
files to include inline between <body> and the content of a rendered
|
|
|
|
Markdown file or generated documentation
|
2014-06-28 12:35:25 +02:00
|
|
|
.TP
|
2017-05-23 21:22:51 +02:00
|
|
|
\fB\-\-html\-after\-content\fR \fIFILES\fR
|
|
|
|
files to include inline between the content and </body> of a rendered
|
|
|
|
Markdown file or generated documentation
|
|
|
|
.TP
|
|
|
|
\fB\-\-markdown\-after\-content\fR \fIFILES\fR
|
|
|
|
files to include inline between the content and </body> of a rendered
|
|
|
|
Markdown file or generated documentation
|
|
|
|
.TP
|
|
|
|
\fB\-\-markdown\-css\fR \fIFILES\fR
|
|
|
|
CSS files to include via <link> in a rendered Markdown file Markdown file or
|
|
|
|
generated documentation
|
2015-01-17 20:45:59 +01:00
|
|
|
.TP
|
2015-02-26 10:10:17 +01:00
|
|
|
\fB\-\-markdown\-playground\-url\fR \fIURL\fR
|
2015-01-17 20:45:59 +01:00
|
|
|
URL to send code snippets to
|
|
|
|
.TP
|
2015-02-26 10:10:17 +01:00
|
|
|
\fB\-\-markdown\-no\-toc\fR
|
2015-01-17 20:45:59 +01:00
|
|
|
don't include table of contents
|
|
|
|
.TP
|
2017-05-23 21:22:51 +02:00
|
|
|
\fB\-h\fR, \fB\-\-extend\-css\fR
|
|
|
|
to redefine some css rules with a given file to generate doc with your own theme
|
2015-01-17 20:45:59 +01:00
|
|
|
.TP
|
2015-02-26 10:10:17 +01:00
|
|
|
\fB\-V\fR, \fB\-\-version\fR
|
2015-01-17 20:45:59 +01:00
|
|
|
Print rustdoc's version
|
2013-07-07 06:06:54 +02:00
|
|
|
|
|
|
|
.SH "OUTPUT FORMATS"
|
|
|
|
|
2017-05-23 21:22:51 +02:00
|
|
|
The rustdoc tool can generate output in an HTML format.
|
2013-09-30 22:28:30 +02:00
|
|
|
|
|
|
|
If using an HTML format, then the specified output destination will be the root
|
2015-02-26 10:10:17 +01:00
|
|
|
directory of an HTML structure for all the documentation.
|
|
|
|
Pages will be placed into this directory, and source files will also
|
|
|
|
possibly be rendered into it as well.
|
2013-09-30 22:28:30 +02:00
|
|
|
|
2013-07-07 06:06:54 +02:00
|
|
|
.SH "EXAMPLES"
|
|
|
|
|
|
|
|
To generate documentation for the source in the current directory:
|
|
|
|
$ rustdoc hello.rs
|
|
|
|
|
2013-09-30 22:28:30 +02:00
|
|
|
List all available passes that rustdoc has, along with default passes:
|
2015-02-26 10:10:17 +01:00
|
|
|
$ rustdoc \-\-passes list
|
2013-09-30 22:28:30 +02:00
|
|
|
|
|
|
|
The generated HTML can be viewed with any standard web browser.
|
2013-07-07 06:06:54 +02:00
|
|
|
|
|
|
|
.SH "SEE ALSO"
|
|
|
|
|
2015-02-26 10:10:17 +01:00
|
|
|
.BR rustc (1)
|
2013-07-07 06:06:54 +02:00
|
|
|
|
|
|
|
.SH "BUGS"
|
2016-02-06 06:32:47 +01:00
|
|
|
See <\fBhttps://github.com/rust\-lang/rust/issues\fR>
|
2015-02-26 10:10:17 +01:00
|
|
|
for issues.
|
2013-07-07 06:06:54 +02:00
|
|
|
|
|
|
|
.SH "AUTHOR"
|
2015-02-26 10:10:17 +01:00
|
|
|
See \fIAUTHORS.txt\fR in the Rust source distribution.
|
2013-07-07 06:06:54 +02:00
|
|
|
|
|
|
|
.SH "COPYRIGHT"
|
2015-02-26 10:10:17 +01:00
|
|
|
This work is dual\[hy]licensed under Apache\ 2.0 and MIT terms.
|
|
|
|
See \fICOPYRIGHT\fR file in the rust source distribution.
|