Skip to content

Commit 2a5ad77

Browse files
author
Elly Jones
committed
man: Add rustc.1.
Document the compiler a bit. Not installed yet as I don't understand automake very well. Signed-off-by: Elly Jones <[email protected]>
1 parent 7ae7575 commit 2a5ad77

File tree

1 file changed

+103
-0
lines changed

1 file changed

+103
-0
lines changed

man/rustc.1

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
.TH RUSTC "1" "October 2011" "Rust" "User Commands"
2+
.SH NAME
3+
rustc \- rust compiler
4+
.SH SYNOPSIS
5+
rustc [\fB-h\fR] [\fB-v\fR] [\fB-o\fR \fIoutfile\fR]
6+
[\fB--lib\fR] [\fB--static\fR] [\fB-L\fR \fIpath\fR]
7+
[\fB-g\fR] [\fB-S\fR] [\fB-c\fR] <\fIinput\fR>
8+
.PP
9+
Only the most commonly-used options are listed here. All options are listed and
10+
described below.
11+
.SH DESCRIPTION
12+
This program is a compiler for the Rust language, available at
13+
<\fBhttps://github.com/graydon/rust\fR>.
14+
.SH OPTIONS
15+
.TP
16+
\fB-h, --help\fR: Display help.
17+
.TP
18+
\fB-v, --version\fR: Display version information.
19+
.TP
20+
\fB-o\fR \fIfilename\fR: Write output to \fIfilename\fR. The default output
21+
filename for \fBfoo.rs\fR is otherwise \fBfoo\fR (when compiling a binary),
22+
\fBfoo\fR (when compiling a library), \fBfoo.o\fR (when using \fB-c\fR),
23+
\fBfoo.s\fR (when using \fB-S\fR) or \fBfoo.bc\fR (when using
24+
\fB--emit-llvm\fR).
25+
.TP
26+
\fB--lib\fR: Compile and link a library crate into a shared object.
27+
.TP
28+
\fB--static\fR: Produce a statically-linked binary, or generate a static
29+
library.
30+
.TP
31+
\fB--pretty\fR \fItype\fR: Pretty-print the input. Valid \fItype\fRs are:
32+
.RS
33+
.TP
34+
\fBnormal\fR: Un-annotated source.
35+
.TP
36+
\fBexpanded\fR: Crates expanded.
37+
.TP
38+
\fBtyped\fR: Crates expanded, all expressions annotated with types.
39+
.TP
40+
\fBidentified\fR: Fully parenthesized, ast nodes and blocks annotated with IDs.
41+
.RE
42+
.TP
43+
\fB--ls\fR: Lists symbols defined by the specified \fBcompiled\fR library.
44+
.TP
45+
\fB-L\fR \fIpath\fR: Adds \fIpath\fR to the library search path.
46+
.TP
47+
\fB--noverify\fR: Disables LLVM verification pass, which does sanity checking of
48+
bitcode generated by rustc. Using this option gives a slight speedup, at the
49+
cost of vastly reduced ability to catch rustc bugs. See
50+
<\fBhttp://llvm.org/docs/Passes.html\fR> for a list of properties checked.
51+
.TP
52+
\fB--parse-only\fR: Run the parse phase only. If parsing succeeds, produces no
53+
output.
54+
.TP
55+
\fB--no-trans\fR: Run all passes except translation. Produces no output.
56+
.TP
57+
\fB-g\fR: Produce debug info.
58+
.TP
59+
\fB--OptLevel\fR=\fIlevel\fR: Set optimization level to \fIlevel\fR.
60+
.TP
61+
\fB-O\fR: Equal to --OptLevel=2
62+
.TP
63+
\fB-S\fR: Compile to assembly, but do not assemble or link.
64+
.TP
65+
\fB-c\fR: Compile and assemble, but do not link.
66+
.TP
67+
\fB--emit-llvm\fR: Generate llvm bitcode.
68+
.TP
69+
\fB--save-temps\fR: For foo.rs, save generated bitcode before optimization to
70+
\fBfoo.bc\fR, bitcode after optimization to \fBfoo.opt.bc\fR, and the generated
71+
object file to \fBfoo.o\fR.
72+
.TP
73+
\fB--stats\fR: Print statistics about compilation.
74+
.TP
75+
\fB--cfg\fR \fIcfgspec\fR: Provide a crate config spec.
76+
.TP
77+
\fB--time-passes\fR: Print runtimes of compilation phases.
78+
.TP
79+
\fB--time-llvm-passes\fR: Print runtimes of llvm phases.
80+
.TP
81+
\fB--sysroot\fR \fIpath\fR: Set the system root. Default is rustc's directory.
82+
.TP
83+
\fB--target\fR \fIgnu-config-name\fR: Set the compilation target, which is a
84+
string of the form \fBcpu\fR-\fBmanufacturer\fR-\fBkernel\fR[-\fBos\fR]. Example
85+
values include "i686-unknown-linux-gnu" and "mips-idt-ecoff"; see
86+
<\fBhttp://sources.redhat.com/autobook/autobook/autobook_17.html\fR>. If not
87+
supplied, the host triple is used (see \fB--version\fR output).
88+
.TP
89+
\fB--no-typestate\fR: Disable the typestate pass. This breaks some safety
90+
guarantees of the language and is quite dangerous.
91+
.TP
92+
\fB--test\fR: Build a test harness.
93+
.TP
94+
\fB--gc\fR: \fBEXPERIMENTAL\fR. Garbage-collect shared data.
95+
.TP
96+
\fB--stack-growth\fR: \fBEXPERIMENTAL\fR. Perform stack growth checks.
97+
.SH "BUGS"
98+
See \fBhttps://github.com/graydon/rust/issues\fR for a list of known bugs.
99+
.SH "AUTHOR"
100+
See \fBAUTHORS.txt\fR in the rust source distribution. Graydon Hoare
101+
<\fI[email protected]\fR> is the project leader.
102+
.SH "COPYRIGHT"
103+
See \fBLICENSE.txt\fR in the rust source distribution.

0 commit comments

Comments
 (0)