]> git.lizzy.rs Git - rust.git/blob - README.md
auto merge of #13319 : alexcrichton/rust/rustdoc-fields, r=brson
[rust.git] / README.md
1 # The Rust Programming Language
2
3 This is a compiler for Rust, including standard libraries, tools and
4 documentation.
5
6 ## Quick Start
7
8 1. Download a [binary installer][installer] for your platform.
9 2. Read the [tutorial].
10 3. Enjoy!
11
12 > ***Note:*** Windows users can read the detailed
13 > [getting started][wiki-start] notes on the wiki.
14
15 [installer]: http://www.rust-lang.org/install.html
16 [tutorial]: http://static.rust-lang.org/doc/tutorial.html
17 [wiki-start]: https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust
18 [win-wiki]: https://github.com/mozilla/rust/wiki/Using-Rust-on-Windows
19
20 ## Building from Source
21
22 1. Make sure you have installed the dependencies:
23     * `g++` 4.4 or `clang++` 3.x
24     * `python` 2.6 or later (but not 3.x)
25     * `perl` 5.0 or later
26     * GNU `make` 3.81 or later
27     * `curl`
28 2. Download and build Rust:
29
30     You can either download a [tarball] or build directly from the [repo].
31
32     To build from the [tarball] do:
33
34         $ curl -O http://static.rust-lang.org/dist/rust-nightly.tar.gz
35         $ tar -xzf rust-nightly.tar.gz
36         $ cd rust-nightly
37
38     Or to build from the [repo] do:
39
40         $ git clone https://github.com/mozilla/rust.git
41         $ cd rust
42
43     Now that you have Rust's source code, you can configure and build it:
44
45         $ ./configure
46         $ make && make install
47
48     > ***Note:*** You may need to use `sudo make install` if you do not normally have
49     > permission to modify the destination directory. The install locations can
50     > be adjusted by passing a `--prefix` argument to `configure`. Various other
51     > options are also supported, pass `--help` for more information on them.
52
53     When complete, `make install` will place several programs into
54     `/usr/local/bin`: `rustc`, the Rust compiler, and `rustdoc`, the
55     API-documentation tool.
56     system.
57 3. Read the [tutorial].
58 4. Enjoy!
59
60 [repo]: https://github.com/mozilla/rust
61 [tarball]: http://static.rust-lang.org/dist/rust-nightly.tar.gz
62 [tutorial]: http://static.rust-lang.org/doc/nightly/tutorial.html
63
64 ## Notes
65
66 Since the Rust compiler is written in Rust, it must be built by a
67 precompiled "snapshot" version of itself (made in an earlier state of
68 development). As such, source builds require a connection to the Internet, to
69 fetch snapshots, and an OS that can execute the available snapshot binaries.
70
71 Snapshot binaries are currently built and tested on several platforms:
72
73 * Windows (7, 8, Server 2008 R2), x86 only
74 * Linux (2.6.18 or later, various distributions), x86 and x86-64
75 * OSX 10.7 (Lion) or greater, x86 and x86-64
76
77 You may find that other platforms work, but these are our officially
78 supported build environments that are most likely to work.
79
80 Rust currently needs about 1.5 GiB of RAM to build without swapping; if it hits
81 swap, it will take a very long time to build.
82
83 There is a lot more documentation in the [wiki].
84
85 [wiki]: https://github.com/mozilla/rust/wiki
86
87 ## License
88
89 Rust is primarily distributed under the terms of both the MIT license
90 and the Apache License (Version 2.0), with portions covered by various
91 BSD-like licenses.
92
93 See LICENSE-APACHE, LICENSE-MIT, and COPYRIGHT for details.