fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
9.9 KiB196 linesraw
1rustdoc [options] <input>
2
3Options:
4    -h, --help          show this help message
5    -V, --version       print rustdoc's version
6    -v, --verbose       use verbose output
7    -w, --output-format [html]
8                        the output type to write
9        --output PATH   Which directory to place the output. This option is
10                        deprecated, use --out-dir instead.
11    -o, --out-dir PATH  which directory to place the output
12        --crate-name NAME
13                        specify the name of this crate
14        --crate-type [bin|lib|rlib|dylib|cdylib|staticlib|proc-macro]
15                        Comma separated list of types of crates
16                        for the compiler to emit
17    -L, --library-path DIR
18                        directory to add to crate search path
19        --cfg           pass a --cfg to rustc
20        --check-cfg     pass a --check-cfg to rustc
21        --extern NAME[=PATH]
22                        pass an --extern to rustc
23        --extern-html-root-url NAME=URL
24                        base URL to use for dependencies; for example,
25                        "std=/doc" links std::vec::Vec to
26                        /doc/std/vec/struct.Vec.html
27        --extern-html-root-takes-precedence 
28                        give precedence to `--extern-html-root-url`, not
29                        `html_root_url`
30    -C, --codegen OPT[=VALUE]
31                        pass a codegen option to rustc
32        --document-private-items 
33                        document private items
34        --document-hidden-items 
35                        document items that have doc(hidden)
36        --test          run code examples as tests
37        --test-args ARGS
38                        arguments to pass to the test runner
39        --test-run-directory PATH
40                        The working directory in which to run tests
41        --target TRIPLE target triple to document
42        --markdown-css FILES
43                        CSS files to include via <link> in a rendered Markdown
44                        file
45        --html-in-header FILES
46                        files to include inline in the <head> section of a
47                        rendered Markdown file or generated documentation
48        --html-before-content FILES
49                        files to include inline between <body> and the content
50                        of a rendered Markdown file or generated documentation
51        --html-after-content FILES
52                        files to include inline between the content and
53                        </body> of a rendered Markdown file or generated
54                        documentation
55        --markdown-before-content FILES
56                        files to include inline between <body> and the content
57                        of a rendered Markdown file or generated documentation
58        --markdown-after-content FILES
59                        files to include inline between the content and
60                        </body> of a rendered Markdown file or generated
61                        documentation
62        --markdown-playground-url URL
63                        URL to send code snippets to
64        --markdown-no-toc 
65                        don't include table of contents
66    -e, --extend-css PATH
67                        To add some CSS rules with a given file to generate
68                        doc with your own theme. However, your theme might
69                        break if the rustdoc's generated HTML changes, so be
70                        careful!
71    -Z FLAG             unstable / perma-unstable options (only on nightly
72                        build)
73        --sysroot PATH  Override the system root
74        --playground-url URL
75                        URL to send code snippets to, may be reset by
76                        --markdown-playground-url or
77                        `#![doc(html_playground_url=...)]`
78        --display-doctest-warnings 
79                        show warnings that originate in doctests
80        --crate-version VERSION
81                        crate version to print into documentation
82        --sort-modules-by-appearance 
83                        sort modules by where they appear in the program,
84                        rather than alphabetically
85        --default-theme THEME
86                        Set the default theme. THEME should be the theme name,
87                        generally lowercase. If an unknown default theme is
88                        specified, the builtin default is used. The set of
89                        themes, and the rustdoc built-in default, are not
90                        stable.
91        --default-setting SETTING[=VALUE]
92                        Default value for a rustdoc setting (used when
93                        "rustdoc-SETTING" is absent from web browser Local
94                        Storage). If VALUE is not supplied, "true" is used.
95                        Supported SETTINGs and VALUEs are not documented and
96                        not stable.
97        --theme FILES   additional themes which will be added to the generated
98                        docs
99        --check-theme FILES
100                        check if given theme is valid
101        --resource-suffix PATH
102                        suffix to add to CSS and JavaScript files, e.g.,
103                        "search-index.js" will become "search-index-suffix.js"
104        --edition EDITION
105                        edition to use when compiling rust code (default:
106                        2015)
107        --color auto|always|never
108                        Configure coloring of output:
109                        auto = colorize, if output goes to a tty (default);
110                        always = always colorize output;
111                        never = never colorize output
112        --error-format human|json|short
113                        How errors and other messages are produced
114        --diagnostic-width WIDTH
115                        Provide width of the output for truncated error
116                        messages
117        --json CONFIG   Configure the structure of JSON diagnostics
118    -A, --allow LINT    Set lint allowed
119    -W, --warn LINT     Set lint warnings
120        --force-warn LINT
121                        Set lint force-warn
122    -D, --deny LINT     Set lint denied
123    -F, --forbid LINT   Set lint forbidden
124        --cap-lints LEVEL
125                        Set the most restrictive lint level. More restrictive
126                        lints are capped at this level. By default, it is at
127                        `forbid` level.
128        --index-page PATH
129                        Markdown file to be used as index page
130        --enable-index-page 
131                        To enable generation of the index page
132        --static-root-path PATH
133                        Path string to force loading static files from in
134                        output pages. If not set, uses combinations of '../'
135                        to reach the documentation root.
136        --persist-doctests PATH
137                        Directory to persist doctest executables into
138        --show-coverage 
139                        calculate percentage of public items with
140                        documentation
141        --enable-per-target-ignores 
142                        parse ignore-foo for ignoring doctests on a per-target
143                        basis
144        --runtool The tool to run tests with when building for a different target than host
145                        
146        --runtool-arg One (of possibly many) arguments to pass to the runtool
147                        
148        --test-builder PATH
149                        The rustc-like binary to use as the test builder
150        --check         Run rustdoc checks
151        --generate-redirect-map 
152                        Generate JSON file at the top level instead of
153                        generating HTML redirection files
154        --emit [unversioned-shared-resources,toolchain-shared-resources,invocation-specific]
155                        Comma separated list of types of output for rustdoc to
156                        emit
157        --no-run        Compile doctests without running them
158        --show-type-layout 
159                        Include the memory layout of types in the docs
160        --nocapture     Don't capture stdout and stderr of tests
161        --generate-link-to-definition 
162                        Make the identifiers in the HTML source code pages
163                        navigable
164        --scrape-examples-output-path collect function call information and output at the given path
165                        
166        --scrape-examples-target-crate collect function call information for functions from the target crate
167                        
168        --scrape-tests  Include test code when scraping examples
169        --with-examples path to function call information (for displaying examples in the documentation)
170                        
171        --disable-minification 
172                        removed
173        --plugin-path DIR
174                        removed, see issue #44136
175                        <https://github.com/rust-lang/rust/issues/44136> for
176                        more information
177        --passes PASSES removed, see issue #44136
178                        <https://github.com/rust-lang/rust/issues/44136> for
179                        more information
180        --plugins PLUGINS
181                        removed, see issue #44136
182                        <https://github.com/rust-lang/rust/issues/44136> for
183                        more information
184        --no-defaults   removed, see issue #44136
185                        <https://github.com/rust-lang/rust/issues/44136> for
186                        more information
187    -r, --input-format [rust]
188                        removed, see issue #44136
189                        <https://github.com/rust-lang/rust/issues/44136> for
190                        more information
191        --html-no-source 
192                        Disable HTML source code pages generation
193
194    @path               Read newline separated options from `path`
195
196More information available at https://doc.rust-lang.org/$CHANNEL/rustdoc/what-is-rustdoc.html