Auto merge of #44413 - est31:move_man, r=nikomatsakis
Move the man directory to a subdirectory There is no reason it should be in the top directory.
This commit is contained in:
commit
a7b7dce02d
3 changed files with 1 additions and 2 deletions
|
|
@ -432,7 +432,7 @@ impl Step for Rustc {
|
|||
|
||||
// Man pages
|
||||
t!(fs::create_dir_all(image.join("share/man/man1")));
|
||||
cp_r(&build.src.join("man"), &image.join("share/man/man1"));
|
||||
cp_r(&build.src.join("src/doc/man"), &image.join("share/man/man1"));
|
||||
|
||||
// Debugger scripts
|
||||
builder.ensure(DebuggerScripts {
|
||||
|
|
@ -834,7 +834,6 @@ impl Step for PlainSourceTarball {
|
|||
"config.toml.example",
|
||||
];
|
||||
let src_dirs = [
|
||||
"man",
|
||||
"src",
|
||||
];
|
||||
|
||||
|
|
|
|||
307
src/doc/man/rustc.1
Normal file
307
src/doc/man/rustc.1
Normal file
|
|
@ -0,0 +1,307 @@
|
|||
.TH RUSTC "1" "September 2016" "rustc 1.13.0" "User Commands"
|
||||
.SH NAME
|
||||
rustc \- The Rust compiler
|
||||
.SH SYNOPSIS
|
||||
.B rustc
|
||||
[\fIOPTIONS\fR] \fIINPUT\fR
|
||||
|
||||
.SH DESCRIPTION
|
||||
This program is a compiler for the Rust language, available at https://www.rust\-lang.org.
|
||||
|
||||
.SH OPTIONS
|
||||
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Display the help message.
|
||||
.TP
|
||||
\fB\-\-cfg\fR \fISPEC\fR
|
||||
Configure the compilation environment.
|
||||
.TP
|
||||
\fB\-L\fR [\fIKIND\fR=]\fIPATH\fR
|
||||
Add a directory to the library search path.
|
||||
The optional \fIKIND\fR can be one of:
|
||||
.RS
|
||||
.TP
|
||||
\fBdependency\fR
|
||||
only lookup transitive dependencies here
|
||||
.TP
|
||||
.B crate
|
||||
only lookup local `extern crate` directives here
|
||||
.TP
|
||||
.B native
|
||||
only lookup native libraries here
|
||||
.TP
|
||||
.B framework
|
||||
only look for OSX frameworks here
|
||||
.TP
|
||||
.B all
|
||||
look for anything here (the default)
|
||||
.RE
|
||||
.TP
|
||||
\fB\-l\fR [\fIKIND\fR=]\fINAME\fR
|
||||
Link the generated crate(s) to the specified library \fINAME\fR.
|
||||
The optional \fIKIND\fR can be one of \fIstatic\fR, \fIdylib\fR, or
|
||||
\fIframework\fR.
|
||||
If omitted, \fIdylib\fR is assumed.
|
||||
.TP
|
||||
\fB\-\-crate\-type\fR [bin|lib|rlib|dylib|cdylib|staticlib]
|
||||
Comma separated list of types of crates for the compiler to emit.
|
||||
.TP
|
||||
\fB\-\-crate\-name\fR \fINAME\fR
|
||||
Specify the name of the crate being built.
|
||||
.TP
|
||||
\fB\-\-emit\fR [asm|llvm\-bc|llvm\-ir|obj|link|dep\-info|mir][=\fIPATH\fR]
|
||||
Configure the output that \fBrustc\fR will produce. Each emission may also have
|
||||
an optional explicit output \fIPATH\fR specified for that particular emission
|
||||
kind. This path takes precedence over the \fB-o\fR option.
|
||||
.TP
|
||||
\fB\-\-print\fR [crate\-name|file\-names|sysroot]
|
||||
Comma separated list of compiler information to print on stdout.
|
||||
.TP
|
||||
\fB\-g\fR
|
||||
Equivalent to \fI\-C\ debuginfo=2\fR.
|
||||
.TP
|
||||
\fB\-O\fR
|
||||
Equivalent to \fI\-C\ opt\-level=2\fR.
|
||||
.TP
|
||||
\fB\-o\fR \fIFILENAME\fR
|
||||
Write output to \fIFILENAME\fR. Ignored if multiple \fI\-\-emit\fR outputs are specified which
|
||||
don't have an explicit path otherwise.
|
||||
.TP
|
||||
\fB\-\-out\-dir\fR \fIDIR\fR
|
||||
Write output to compiler\[hy]chosen filename in \fIDIR\fR. Ignored if \fI\-o\fR is specified.
|
||||
Defaults to the current directory.
|
||||
.TP
|
||||
\fB\-\-explain\fR \fIOPT\fR
|
||||
Provide a detailed explanation of an error message.
|
||||
.TP
|
||||
\fB\-\-test\fR
|
||||
Build a test harness.
|
||||
.TP
|
||||
\fB\-\-target\fR \fITARGET\fR
|
||||
Target triple for which the code is compiled. This option defaults to the host’s target
|
||||
triple. The target triple has the general format <arch><sub>\-<vendor>\-<sys>\-<abi>, where:
|
||||
.RS
|
||||
.TP
|
||||
.B <arch>
|
||||
x86, arm, thumb, mips, etc.
|
||||
.TP
|
||||
.B <sub>
|
||||
for example on ARM: v5, v6m, v7a, v7m, etc.
|
||||
.TP
|
||||
.B <vendor>
|
||||
pc, apple, nvidia, ibm, etc.
|
||||
.TP
|
||||
.B <sys>
|
||||
none, linux, win32, darwin, cuda, etc.
|
||||
.TP
|
||||
.B <abi>
|
||||
eabi, gnu, android, macho, elf, etc.
|
||||
.RE
|
||||
.TP
|
||||
\fB\-W help\fR
|
||||
Print 'lint' options and default settings.
|
||||
.TP
|
||||
\fB\-W\fR \fIOPT\fR, \fB\-\-warn\fR \fIOPT\fR
|
||||
Set lint warnings.
|
||||
.TP
|
||||
\fB\-A\fR \fIOPT\fR, \fB\-\-allow\fR \fIOPT\fR
|
||||
Set lint allowed.
|
||||
.TP
|
||||
\fB\-D\fR \fIOPT\fR, \fB\-\-deny\fR \fIOPT\fR
|
||||
Set lint denied.
|
||||
.TP
|
||||
\fB\-F\fR \fIOPT\fR, \fB\-\-forbid\fR \fIOPT\fR
|
||||
Set lint forbidden.
|
||||
.TP
|
||||
\fB\-C\fR \fIFLAG\fR[=\fIVAL\fR], \fB\-\-codegen\fR \fIFLAG\fR[=\fIVAL\fR]
|
||||
Set a codegen\[hy]related flag to the value specified.
|
||||
Use \fI\-C help\fR to print available flags.
|
||||
See CODEGEN OPTIONS below.
|
||||
.TP
|
||||
\fB\-V\fR, \fB\-\-version\fR
|
||||
Print version info and exit.
|
||||
.TP
|
||||
\fB\-v\fR, \fB\-\-verbose\fR
|
||||
Use verbose output.
|
||||
.TP
|
||||
\fB\-\-extern\fR \fINAME\fR=\fIPATH\fR
|
||||
Specify where an external rust library is located. These should match
|
||||
\fIextern\fR declarations in the crate's source code.
|
||||
.TP
|
||||
\fB\-\-sysroot\fR \fIPATH\fR
|
||||
Override the system root.
|
||||
.TP
|
||||
\fB\-Z\fR \fIFLAG\fR
|
||||
Set internal debugging options.
|
||||
Use \fI\-Z help\fR to print available options.
|
||||
.TP
|
||||
\fB\-\-color\fR auto|always|never
|
||||
Configure coloring of output:
|
||||
.RS
|
||||
.TP
|
||||
.B auto
|
||||
colorize, if output goes to a tty (default);
|
||||
.TP
|
||||
.B always
|
||||
always colorize output;
|
||||
.TP
|
||||
.B never
|
||||
never colorize output.
|
||||
.RE
|
||||
|
||||
.SH CODEGEN OPTIONS
|
||||
|
||||
.TP
|
||||
\fBar\fR=\fI/path/to/ar\fR
|
||||
Path to the archive utility to use when assembling archives.
|
||||
.TP
|
||||
\fBlinker\fR=\fI/path/to/cc\fR
|
||||
Path to the linker utility to use when linking libraries, executables, and
|
||||
objects.
|
||||
.TP
|
||||
\fBlink\-args\fR='\fI\-flag1 \-flag2\fR'
|
||||
A space\[hy]separated list of extra arguments to pass to the linker when the linker
|
||||
is invoked.
|
||||
.TP
|
||||
\fBlto\fR
|
||||
Perform LLVM link\[hy]time optimizations.
|
||||
.TP
|
||||
\fBtarget\-cpu\fR=\fIhelp\fR
|
||||
Selects a target processor.
|
||||
If the value is 'help', then a list of available CPUs is printed.
|
||||
.TP
|
||||
\fBtarget\-feature\fR='\fI+feature1\fR,\fI\-feature2\fR'
|
||||
A comma\[hy]separated list of features to enable or disable for the target.
|
||||
A preceding '+' enables a feature while a preceding '\-' disables it.
|
||||
Available features can be discovered through \fIllc -mcpu=help\fR.
|
||||
.TP
|
||||
\fBpasses\fR=\fIval\fR
|
||||
A space\[hy]separated list of extra LLVM passes to run.
|
||||
A value of 'list' will cause \fBrustc\fR to print all known passes and
|
||||
exit.
|
||||
The passes specified are appended at the end of the normal pass manager.
|
||||
.TP
|
||||
\fBllvm\-args\fR='\fI\-arg1\fR \fI\-arg2\fR'
|
||||
A space\[hy]separated list of arguments to pass through to LLVM.
|
||||
.TP
|
||||
\fBsave\-temps\fR
|
||||
If specified, the compiler will save more files (.bc, .o, .no\-opt.bc) generated
|
||||
throughout compilation in the output directory.
|
||||
.TP
|
||||
\fBrpath\fR
|
||||
If specified, then the rpath value for dynamic libraries will be set in
|
||||
either dynamic library or executable outputs.
|
||||
.TP
|
||||
\fBno\-prepopulate\-passes\fR
|
||||
Suppresses pre\[hy]population of the LLVM pass manager that is run over the module.
|
||||
.TP
|
||||
\fBno\-vectorize\-loops\fR
|
||||
Suppresses running the loop vectorization LLVM pass, regardless of optimization
|
||||
level.
|
||||
.TP
|
||||
\fBno\-vectorize\-slp\fR
|
||||
Suppresses running the LLVM SLP vectorization pass, regardless of optimization
|
||||
level.
|
||||
.TP
|
||||
\fBsoft\-float\fR
|
||||
Generates software floating point library calls instead of hardware
|
||||
instructions.
|
||||
.TP
|
||||
\fBprefer\-dynamic\fR
|
||||
Prefers dynamic linking to static linking.
|
||||
.TP
|
||||
\fBno\-integrated\-as\fR
|
||||
Force usage of an external assembler rather than LLVM's integrated one.
|
||||
.TP
|
||||
\fBno\-redzone\fR
|
||||
Disable the use of the redzone.
|
||||
.TP
|
||||
\fBrelocation\-model\fR=[pic,static,dynamic\-no\-pic]
|
||||
The relocation model to use.
|
||||
(Default: \fIpic\fR)
|
||||
.TP
|
||||
\fBcode\-model\fR=[small,kernel,medium,large]
|
||||
Choose the code model to use.
|
||||
.TP
|
||||
\fBmetadata\fR=\fIval\fR
|
||||
Metadata to mangle symbol names with.
|
||||
.TP
|
||||
\fBextra\-filename\fR=\fIval\fR
|
||||
Extra data to put in each output filename.
|
||||
.TP
|
||||
\fBcodegen\-units\fR=\fIn\fR
|
||||
Divide crate into \fIn\fR units to optimize in parallel.
|
||||
.TP
|
||||
\fBremark\fR=\fIval\fR
|
||||
Print remarks for these optimization passes (space separated, or "all").
|
||||
.TP
|
||||
\fBno\-stack\-check\fR
|
||||
Disable checks for stack exhaustion (a memory\[hy]safety hazard!).
|
||||
.TP
|
||||
\fBdebuginfo\fR=\fIval\fR
|
||||
Debug info emission level:
|
||||
.RS
|
||||
.TP
|
||||
.B 0
|
||||
no debug info;
|
||||
.TP
|
||||
.B 1
|
||||
line\[hy]tables only (for stacktraces and breakpoints);
|
||||
.TP
|
||||
.B 2
|
||||
full debug info with variable and type information.
|
||||
.RE
|
||||
.TP
|
||||
\fBopt\-level\fR=\fIVAL\fR
|
||||
Optimize with possible levels 0\[en]3
|
||||
|
||||
.SH ENVIRONMENT
|
||||
|
||||
Some of these affect the output of the compiler, while others affect programs
|
||||
which link to the standard library.
|
||||
|
||||
.TP
|
||||
\fBRUST_TEST_THREADS\fR
|
||||
The test framework Rust provides executes tests in parallel. This variable sets
|
||||
the maximum number of threads used for this purpose. This setting is overridden
|
||||
by the --test-threads option.
|
||||
|
||||
.TP
|
||||
\fBRUST_TEST_NOCAPTURE\fR
|
||||
If set to a value other than "0", a synonym for the --nocapture flag.
|
||||
|
||||
.TP
|
||||
\fBRUST_MIN_STACK\fR
|
||||
Sets the minimum stack size for new threads.
|
||||
|
||||
.TP
|
||||
\fBRUST_BACKTRACE\fR
|
||||
If set to a value different than "0", produces a backtrace in the output of a program which panics.
|
||||
|
||||
.SH "EXAMPLES"
|
||||
To build an executable from a source file with a main function:
|
||||
$ rustc \-o hello hello.rs
|
||||
|
||||
To build a library from a source file:
|
||||
$ rustc \-\-crate\-type=lib hello\-lib.rs
|
||||
|
||||
To build either with a crate (.rs) file:
|
||||
$ rustc hello.rs
|
||||
|
||||
To build an executable with debug info:
|
||||
$ rustc \-g \-o hello hello.rs
|
||||
|
||||
.SH "SEE ALSO"
|
||||
|
||||
.BR rustdoc (1)
|
||||
|
||||
.SH "BUGS"
|
||||
See https://github.com/rust\-lang/rust/issues for issues.
|
||||
|
||||
.SH "AUTHOR"
|
||||
See https://github.com/rust\-lang/rust/graphs/contributors or use `git log --all --format='%cN <%cE>' | sort -u` in the rust source distribution.
|
||||
|
||||
.SH "COPYRIGHT"
|
||||
This work is dual\[hy]licensed under Apache\ 2.0 and MIT terms.
|
||||
See \fICOPYRIGHT\fR file in the rust source distribution.
|
||||
126
src/doc/man/rustdoc.1
Normal file
126
src/doc/man/rustdoc.1
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
.TH RUSTDOC "1" "May 2017" "rustdoc 1.19.0" "User Commands"
|
||||
.SH NAME
|
||||
rustdoc \- generate documentation from Rust source code
|
||||
.SH SYNOPSIS
|
||||
.B rustdoc
|
||||
[\fIOPTIONS\fR] \fIINPUT\fR
|
||||
|
||||
.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.
|
||||
|
||||
.SH OPTIONS
|
||||
|
||||
.TP
|
||||
\fB\-r\fR, \fB\-\-input\-format\fR \fIFORMAT\fR
|
||||
rust
|
||||
.TP
|
||||
\fB\-w\fR, \fB\-\-output\-format\fR \fIFORMAT\fR
|
||||
html
|
||||
.TP
|
||||
\fB\-o\fR, \fB\-\-output\fR \fIOUTPUT\fR,
|
||||
where to place the output (default: \fIdoc/\fR for html)
|
||||
.TP
|
||||
\fB\-\-passes\fR \fILIST\fR
|
||||
space\[hy]separated list of passes to run (default: '')
|
||||
.TP
|
||||
\fB\-\-no\-defaults\fR
|
||||
don't run the default passes
|
||||
.TP
|
||||
\fB\-\-plugins\fR \fILIST\fR
|
||||
space-separated list of plugins to run (default: '')
|
||||
.TP
|
||||
\fB\-\-plugin\-path\fR \fIDIR\fR
|
||||
directory to load plugins from (default: \fI/tmp/rustdoc_ng/plugins\fR)
|
||||
.TP
|
||||
\fB\-\-target\fR \fITRIPLE\fR
|
||||
target triple to document
|
||||
.TP
|
||||
\fB\-\-crate\-name\fR \fINAME\fR
|
||||
specify the name of this crate
|
||||
.TP
|
||||
\fB\-L\fR, \fB\-\-library\-path\fR \fIDIR\fR
|
||||
directory to add to crate search path
|
||||
.TP
|
||||
\fB\-\-cfg\fR \fISPEC\fR
|
||||
pass a \fI\-\-cfg\fR to rustc
|
||||
.TP
|
||||
\fB\-\-extern\fR \fIVAL\fR
|
||||
pass an \fI\-\-extern\fR to rustc
|
||||
.TP
|
||||
\fB\-\-test\fR
|
||||
run code examples as tests
|
||||
.TP
|
||||
\fB\-\-test\-args\fR \fIARGS\fR
|
||||
pass arguments to the test runner
|
||||
.TP
|
||||
\fB\-\-html\-in\-header\fR \fIFILE\fR
|
||||
file to add to <head>
|
||||
.TP
|
||||
\fB\-\-html\-before\-content\fR \fIFILES\fR
|
||||
files to include inline between <body> and the content of a rendered Markdown
|
||||
file or generated documentation
|
||||
.TP
|
||||
\fB\-\-markdown\-before\-content\fR \fIFILES\fR
|
||||
files to include inline between <body> and the content of a rendered
|
||||
Markdown file or generated documentation
|
||||
.TP
|
||||
\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
|
||||
.TP
|
||||
\fB\-\-markdown\-playground\-url\fR \fIURL\fR
|
||||
URL to send code snippets to
|
||||
.TP
|
||||
\fB\-\-markdown\-no\-toc\fR
|
||||
don't include table of contents
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-extend\-css\fR
|
||||
to redefine some css rules with a given file to generate doc with your own theme
|
||||
.TP
|
||||
\fB\-V\fR, \fB\-\-version\fR
|
||||
Print rustdoc's version
|
||||
|
||||
.SH "OUTPUT FORMATS"
|
||||
|
||||
The rustdoc tool can generate output in an HTML 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.
|
||||
|
||||
.SH "EXAMPLES"
|
||||
|
||||
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
|
||||
|
||||
The generated HTML can be viewed with any standard web browser.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
|
||||
.BR rustc (1)
|
||||
|
||||
.SH "BUGS"
|
||||
See <\fBhttps://github.com/rust\-lang/rust/issues\fR>
|
||||
for issues.
|
||||
|
||||
.SH "AUTHOR"
|
||||
See \fIAUTHORS.txt\fR in the Rust source distribution.
|
||||
|
||||
.SH "COPYRIGHT"
|
||||
This work is dual\[hy]licensed under Apache\ 2.0 and MIT terms.
|
||||
See \fICOPYRIGHT\fR file in the rust source distribution.
|
||||
Loading…
Add table
Add a link
Reference in a new issue