|
| 1 | +### Installing Rust |
| 2 | + |
| 3 | +Windows installer |
| 4 | +========================= |
| 5 | + |
| 6 | +FIXME: the installer is broken and borks %PATH% |
| 7 | + |
| 8 | + |
| 9 | +Source build |
| 10 | +========================= |
| 11 | + |
| 12 | +The Rust compiler is slightly unusual in that it is written in Rust and |
| 13 | +therefore must be built by a precompiled "snapshot" version of itself (made in |
| 14 | +an earlier state of development). As such, source builds require that: |
| 15 | + |
| 16 | + * You are connected to the internet, to fetch snapshots. |
| 17 | + |
| 18 | + * You can at least execute snapshot binaries of one of the forms we offer |
| 19 | + them in. Currently we build and test snapshots on: |
| 20 | + * Windows (7, server 2008 r2) x86 only |
| 21 | + * Linux 2.6.x (various distributions) x86 and x86-64 |
| 22 | + * OSX 10.6 ("Snow leopard") or 10.7 ("Lion") x86 and x86-64 |
| 23 | + |
| 24 | +You may find other platforms work, but these are our "tier 1" supported build |
| 25 | +environments that are most likely to work. Further platforms will be added to |
| 26 | +the list in the future via cross-compilation. |
| 27 | + |
| 28 | +To build from source you will also need the following prerequisite packages: |
| 29 | + |
| 30 | + * g++ 4.4 or clang++ 3.x |
| 31 | + * python 2.6 or later |
| 32 | + * perl 5.0 or later |
| 33 | + * gnu make 3.81 or later |
| 34 | + * curl |
| 35 | + |
| 36 | + |
| 37 | +Building and installing |
| 38 | +========================= |
| 39 | + |
| 40 | +Assuming you're on a relatively modern Linux/OSX system and have met the |
| 41 | +prerequisites, something along these lines should work: |
| 42 | + |
| 43 | + $ tar -xzf rust-0.1.tar.gz |
| 44 | + $ cd rust-0.1 |
| 45 | + $ ./configure |
| 46 | + $ make && make install |
| 47 | + |
| 48 | +When complete, make install will place the following programs into |
| 49 | +/usr/local/bin: |
| 50 | + |
| 51 | + * rustc, the Rust compiler |
| 52 | + * rustdoc, the API-documentation tool |
| 53 | + * cargo, the Rust package manager |
| 54 | + |
| 55 | +In addition to a manual page under /usr/local/share/man and a set of host and |
| 56 | +target libraries under /usr/local/lib/rustc. |
| 57 | + |
| 58 | +The install locations can be adjusted by passing a --prefix argument to |
| 59 | +configure. Various other options are also supported, pass --help for more |
| 60 | +information on them. |
| 61 | + |
| 62 | + |
| 63 | +More help |
| 64 | +========================= |
| 65 | + |
| 66 | +Be sure to check out the 'Getting started' page on the Rust wiki: |
| 67 | + |
| 68 | + https://github.com/mozilla/rust/wiki/Doc-getting-started |
0 commit comments