1 # The Rust Programming Language
3 This is a compiler for Rust, including standard libraries, tools and
10 1. Download and use the [installer][win-exe].
11 2. Read the [tutorial].
14 > ***Note:*** Windows users should read the detailed
15 > [getting started][wiki-start] notes on the wiki. Even when using
16 > the binary installer the Windows build requires a MinGW installation,
17 > the precise details of which are not discussed here.
19 [tutorial]: http://static.rust-lang.org/doc/tutorial.html
20 [wiki-start]: https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust
21 [win-exe]: http://static.rust-lang.org/dist/rust-0.8-install.exe
25 1. Install the prerequisites (if not already installed)
26 * g++ 4.4 or clang++ 3.x
27 * python 2.6 or later (but not 3.x)
29 * gnu make 3.81 or later
31 2. Download and build Rust
32 You can either download a [tarball] or build directly from the [repo].
34 To build from the [tarball] do:
36 $ curl -O http://static.rust-lang.org/dist/rust-0.8.tar.gz
37 $ tar -xzf rust-0.8.tar.gz
40 Or to build from the [repo] do:
42 $ git clone https://github.com/mozilla/rust.git
45 Now that you have Rust's source code, you can configure and build it:
48 $ make && make install
50 You may need to use `sudo make install` if you do not normally have
51 permission to modify the destination directory. The install locations can
52 be adjusted by passing a `--prefix` argument to `configure`. Various other
53 options are also supported, pass `--help` for more information on them.
55 When complete, `make install` will place several programs into
56 `/usr/local/bin`: `rustc`, the Rust compiler; `rustdoc`, the
57 API-documentation tool, and `rustpkg`, the Rust package manager and build
59 3. Read the [tutorial].
62 [repo]: https://github.com/mozilla/rust
63 [tarball]: http://static.rust-lang.org/dist/rust-0.8.tar.gz
64 [tutorial]: http://static.rust-lang.org/doc/0.8/tutorial.html
68 Since the Rust compiler is written in Rust, it must be built by a
69 precompiled "snapshot" version of itself (made in an earlier state of
70 development). As such, source builds require a connection to the Internet, to
71 fetch snapshots, and an OS that can execute the available snapshot binaries.
73 Snapshot binaries are currently built and tested on several platforms:
75 * Windows (7, Server 2008 R2), x86 only
76 * Linux (various distributions), x86 and x86-64
77 * OSX 10.6 ("Snow Leopard") or greater, x86 and x86-64
79 You may find that other platforms work, but these are our "tier 1"
80 supported build environments that are most likely to work.
82 Rust currently needs about 1.8G of RAM to build without swapping; if it hits
83 swap, it will take a very long time to build.
85 There is lots more documentation in the [wiki].
87 [wiki]: https://github.com/mozilla/rust/wiki
92 Rust is primarily distributed under the terms of both the MIT license
93 and the Apache License (Version 2.0), with portions covered by various
96 See LICENSE-APACHE, LICENSE-MIT, and COPYRIGHT for details.