diff options
Diffstat (limited to 'man/rustdoc.1')
| -rw-r--r-- | man/rustdoc.1 | 102 |
1 files changed, 55 insertions, 47 deletions
diff --git a/man/rustdoc.1 b/man/rustdoc.1 index 830884b19bd..1738354fb43 100644 --- a/man/rustdoc.1 +++ b/man/rustdoc.1 @@ -8,76 +8,79 @@ rustdoc \- generate documentation from Rust source code .SH DESCRIPTION This tool generates API reference documentation by extracting comments from source code written in the Rust language, available at -<\fBhttps://www.rust-lang.org\fR>. It accepts several input formats and provides -several output formats for the generated documentation. +.UR https://www.rust\-lang.org +.UE . +It accepts several input formats and provides several output formats +for the generated documentation. .SH OPTIONS .TP --r --input-format <val> +\fB\-r\fR, \fB\-\-input\-format\fR \fIFORMAT\fR html or json (default: inferred) .TP --w --output-format <val> +\fB\-w\fR, \fB\-\-output\-format\fR \fIFORMAT\fR html or json (default: html) .TP --o --output <val> -where to place the output (default: doc/ for html, doc.json for json) +\fB\-o\fR, \fB\-\-output\fR \fIOUTPUT\fR +where to place the output (default: \fIdoc/\fR for html, +\fIdoc.json\fR for json) .TP ---passes <val> -space-separated list of passes to run (default: '') +\fB\-\-passes\fR \fILIST\fR +space\[hy]separated list of passes to run (default: '') .TP ---no-defaults +\fB\-\-no\-defaults\fR don't run the default passes .TP ---plugins <val> +\fB\-\-plugins\fR \fILIST\fR space-separated list of plugins to run (default: '') .TP ---plugin-path <val> -directory to load plugins from (default: /tmp/rustdoc_ng/plugins) +\fB\-\-plugin\-path\fR \fIDIR\fR +directory to load plugins from (default: \fI/tmp/rustdoc_ng/plugins\fR) .TP ---target <val> +\fB\-\-target\fR \fITRIPLE\fR target triple to document .TP ---crate-name <val> +\fB\-\-crate\-name\fR \fINAME\fR specify the name of this crate .TP --L --library-path <val> +\fB\-L\fR, \fB\-\-library\-path\fR \fIDIR\fR directory to add to crate search path .TP ---cfg <val> -pass a --cfg to rustc +\fB\-\-cfg\fR \fISPEC\fR +pass a \fI\-\-cfg\fR to rustc .TP ---extern <val> -pass an --extern to rustc +\fB\-\-extern\fR \fIVAL\fR +pass an \fI\-\-extern\fR to rustc .TP ---test +\fB\-\-test\fR run code examples as tests .TP ---test-args <val> +\fB\-\-test\-args\fR \fIARGS\fR pass arguments to the test runner .TP ---html-in-header <val> +\fB\-\-html\-in\-header\fR \fIFILE\fR file to add to <head> .TP ---html-before-content <val> +\fB\-\-html\-before\-content\fR \fIFILE\fR file to add in <body>, before content .TP ---html-after-content <val> +\fB\-\-html\-after\-content\fR \fIFILE\fR file to add in <body>, after content .TP ---markdown-css <val> +\fB\-\-markdown\-css\fR \fIFILE\fR CSS files to include via <link> in a rendered Markdown file .TP ---markdown-playground-url <val> +\fB\-\-markdown\-playground\-url\fR \fIURL\fR URL to send code snippets to .TP ---markdown-no-toc +\fB\-\-markdown\-no\-toc\fR don't include table of contents .TP --h, --help +\fB\-h\fR, \fB\-\-help\fR Print help .TP --V, --version +\fB\-V\fR, \fB\-\-version\fR Print rustdoc's version .SH "OUTPUT FORMATS" @@ -85,14 +88,15 @@ Print rustdoc's version The rustdoc tool can generate output in either an HTML or JSON format. If using an HTML format, then the specified output destination will be the root -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. +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. If using a JSON format, then the specified output destination will have the -rustdoc output serialized as JSON into it. This output format exists to -pre-compile documentation for crates, and for usage in non-rustdoc tools. The -JSON output is the following hash: +rustdoc output serialized as JSON into it. +This output format exists to pre\[hy]compile documentation for crates, +and for usage in non\[hy]rustdoc tools. +The JSON output is the following hash: { "schema": VERSION, @@ -100,11 +104,12 @@ JSON output is the following hash: "plugins": ..., } -The schema version indicates what the structure of crate/plugins will look -like. Within a schema version the structure will remain the same. The `crate` -field will contain all relevant documentation for the source being documented, -and the `plugins` field will contain the output of the plugins run over the -crate. +The schema version indicates what the structure of crate/plugins will +look like. +Within a schema version the structure will remain the same. +The \fIcrate\fR field will contain all relevant documentation for the +source being documented, and the \fIplugins\fR field will contain the +output of the plugins run over the crate. .SH "EXAMPLES" @@ -112,25 +117,28 @@ To generate documentation for the source in the current directory: $ rustdoc hello.rs List all available passes that rustdoc has, along with default passes: - $ rustdoc --passes list + $ rustdoc \-\-passes list To precompile the documentation for a crate, and then use it to render html at a later date: - $ rustdoc -w json hello.rs + $ rustdoc \-w json hello.rs $ rustdoc doc.json The generated HTML can be viewed with any standard web browser. .SH "SEE ALSO" -rustc +.BR rustc (1) .SH "BUGS" -See <\fBhttps://github.com/rust-lang/rust/issues\fR> for issues. +See +.UR https://github.com/rust\-lang/rust/issues +.UE +for issues. .SH "AUTHOR" -See \fBAUTHORS.txt\fR in the Rust source distribution. +See \fIAUTHORS.txt\fR in the Rust source distribution. .SH "COPYRIGHT" -This work is dual-licensed under Apache 2.0 and MIT terms. See \fBCOPYRIGHT\fR -file in the rust source distribution. +This work is dual\[hy]licensed under Apache\ 2.0 and MIT terms. +See \fICOPYRIGHT\fR file in the rust source distribution. |
