Skip to content

Commit eed2ca6

Browse files
committed
auto merge of #5040 : Kimundi/rust/incoming, r=graydon
2 parents e4ff013 + 34c39bb commit eed2ca6

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

doc/tutorial.md

+20-3
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,9 @@ for more information on them.
114114

115115
When complete, `make install` will place several programs into
116116
`/usr/local/bin`: `rustc`, the Rust compiler; `rustdoc`, the
117-
API-documentation tool; `cargo`, the Rust package manager;
118-
and `rusti`, the Rust REPL.
117+
API-documentation tool; `rustpkg`, the Rust package manager;
118+
`rusti`, the Rust REPL; and `rust`, a tool which acts both as a unified
119+
interface for them, and for a few common command line scenarios.
119120

120121
[wiki-start]: https://github.com./mozilla/rust/wiki/Note-getting-started-developing-Rust
121122
[tarball]: http://static.rust-lang.org/dist/rust-0.5.tar.gz
@@ -154,6 +155,22 @@ declaration to appear at the top level of the file: all statements must
154155
live inside a function. Rust programs can also be compiled as
155156
libraries, and included in other programs.
156157

158+
## Using the rust tool
159+
160+
While using `rustc` directly to generate your executables, and then
161+
running them manually is a perfectly valid way to test your code,
162+
for smaller projects, prototypes, or if you're a beginner, it might be
163+
more convenient to use the `rust` tool.
164+
165+
The `rust` tool provides central access to the other rust tools,
166+
as well as handy shortcuts for directly running source files.
167+
For example, if you have a file `foo.rs` in your current directory,
168+
`rust run foo.rs` would attempt to compile it and, if successful,
169+
directly run the resulting binary.
170+
171+
To get a list of all available commands, simply call `rust` without any
172+
argument.
173+
157174
## Editing Rust code
158175

159176
There are vim highlighting and indentation scripts in the Rust source
@@ -2184,7 +2201,7 @@ impl Circle for CircleStruct {
21842201
}
21852202
impl Shape for CircleStruct {
21862203
fn area(&self) -> float { pi * square(self.radius) }
2187-
}
2204+
}
21882205
~~~~
21892206

21902207
Notice that methods of `Circle` can call methods on `Shape`, as our

0 commit comments

Comments
 (0)