157 lines
5.3 KiB
HTML
157 lines
5.3 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of RUSTDOC</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>RUSTDOC</H1>
|
|
Section: User Commands (1)<BR>Updated: December 2020<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
rustdoc - generate documentation from Rust source code
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>rustdoc</B>
|
|
|
|
[<I>OPTIONS</I>] <I>INPUT</I>
|
|
<P>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
This tool generates API reference documentation by extracting comments from
|
|
source code written in the Rust language, available at
|
|
<<B><A HREF="https://www.rust-lang.org">https://www.rust-lang.org</A></B>>. It accepts several input formats and
|
|
provides several output formats for the generated documentation.
|
|
<P>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-r</B>, <B>--input-format</B> <I>FORMAT</I><DD>
|
|
rust
|
|
<DT id="2"><B>-w</B>, <B>--output-format</B> <I>FORMAT</I><DD>
|
|
html
|
|
<DT id="3"><B>-o</B>, <B>--output</B> <I>OUTPUT</I>,<DD>
|
|
where to place the output (default: <I>doc/</I> for html)
|
|
<DT id="4"><B>--passes</B> <I>LIST</I><DD>
|
|
space-separated list of passes to run (default: '')
|
|
<DT id="5"><B>--no-defaults</B><DD>
|
|
don't run the default passes
|
|
<DT id="6"><B>--plugins</B> <I>LIST</I><DD>
|
|
space-separated list of plugins to run (default: '')
|
|
<DT id="7"><B>--plugin-path</B> <I>DIR</I><DD>
|
|
directory to load plugins from (default: <I>/tmp/rustdoc_ng/plugins</I>)
|
|
<DT id="8"><B>--target</B> <I>TRIPLE</I><DD>
|
|
target triple to document
|
|
<DT id="9"><B>--crate-name</B> <I>NAME</I><DD>
|
|
specify the name of this crate
|
|
<DT id="10"><B>-L</B>, <B>--library-path</B> <I>DIR</I><DD>
|
|
directory to add to crate search path
|
|
<DT id="11"><B>--cfg</B> <I>SPEC</I><DD>
|
|
pass a <I>--cfg</I> to rustc
|
|
<DT id="12"><B>--extern</B> <I>VAL</I><DD>
|
|
pass an <I>--extern</I> to rustc
|
|
<DT id="13"><B>--test</B><DD>
|
|
run code examples as tests
|
|
<DT id="14"><B>--test-args</B> <I>ARGS</I><DD>
|
|
pass arguments to the test runner
|
|
<DT id="15"><B>--html-in-header</B> <I>FILE</I><DD>
|
|
file to add to <head>
|
|
<DT id="16"><B>--html-before-content</B> <I>FILES</I><DD>
|
|
files to include inline between <body> and the content of a rendered Markdown
|
|
file or generated documentation
|
|
<DT id="17"><B>--markdown-before-content</B> <I>FILES</I><DD>
|
|
files to include inline between <body> and the content of a rendered
|
|
Markdown file or generated documentation
|
|
<DT id="18"><B>--html-after-content</B> <I>FILES</I><DD>
|
|
files to include inline between the content and </body> of a rendered
|
|
Markdown file or generated documentation
|
|
<DT id="19"><B>--markdown-after-content</B> <I>FILES</I><DD>
|
|
files to include inline between the content and </body> of a rendered
|
|
Markdown file or generated documentation
|
|
<DT id="20"><B>--markdown-css</B> <I>FILES</I><DD>
|
|
CSS files to include via <link> in a rendered Markdown file Markdown file or
|
|
generated documentation
|
|
<DT id="21"><B>--markdown-playground-url</B> <I>URL</I><DD>
|
|
URL to send code snippets to
|
|
<DT id="22"><B>--markdown-no-toc</B><DD>
|
|
don't include table of contents
|
|
<DT id="23"><B>-h</B>, <B>--extend-css</B><DD>
|
|
to redefine some css rules with a given file to generate doc with your own theme
|
|
<DT id="24"><B>-V</B>, <B>--version</B><DD>
|
|
Print rustdoc's version
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>OUTPUT FORMATS</H2>
|
|
|
|
<P>
|
|
The rustdoc tool can generate output in an HTML format.
|
|
<P>
|
|
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.
|
|
<P>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
<P>
|
|
To generate documentation for the source in the current directory:
|
|
<BR> $ rustdoc hello.rs
|
|
<P>
|
|
List all available passes that rustdoc has, along with default passes:
|
|
<BR> $ rustdoc --passes list
|
|
<P>
|
|
The generated HTML can be viewed with any standard web browser.
|
|
<P>
|
|
<A NAME="lbAH"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<P>
|
|
<B><A HREF="/cgi-bin/man/man2html?1+rustc">rustc</A></B>(1)
|
|
|
|
<P>
|
|
<A NAME="lbAI"> </A>
|
|
<H2>BUGS</H2>
|
|
|
|
See <<B><A HREF="https://github.com/rust-lang/rust/issues">https://github.com/rust-lang/rust/issues</A></B>>
|
|
for issues.
|
|
<P>
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
See the version control history or <<B><A HREF="https://thanks.rust-lang.org">https://thanks.rust-lang.org</A></B>>
|
|
<P>
|
|
<A NAME="lbAK"> </A>
|
|
<H2>COPYRIGHT</H2>
|
|
|
|
This work is dual-licensed under Apache 2.0 and MIT terms.
|
|
See <I>COPYRIGHT</I> file in the rust source distribution.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="25"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="26"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="27"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="28"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="29"><A HREF="#lbAF">OUTPUT FORMATS</A><DD>
|
|
<DT id="30"><A HREF="#lbAG">EXAMPLES</A><DD>
|
|
<DT id="31"><A HREF="#lbAH">SEE ALSO</A><DD>
|
|
<DT id="32"><A HREF="#lbAI">BUGS</A><DD>
|
|
<DT id="33"><A HREF="#lbAJ">AUTHOR</A><DD>
|
|
<DT id="34"><A HREF="#lbAK">COPYRIGHT</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:26 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|