]> git.proxmox.com Git - rustc.git/blame - src/doc/trpl/installing-rust.md
Imported Upstream version 1.0.0~beta
[rustc.git] / src / doc / trpl / installing-rust.md
CommitLineData
1a4d82fc
JJ
1% Installing Rust
2
3The first step to using Rust is to install it! There are a number of ways to
4install Rust, but the easiest is to use the `rustup` script. If you're on
5Linux or a Mac, all you need to do is this (note that you don't need to type
6in the `$`s, they just indicate the start of each command):
7
8```bash
c34b1796 9$ curl -sf -L https://static.rust-lang.org/rustup.sh | sudo sh
1a4d82fc
JJ
10```
11
12If you're concerned about the [potential insecurity](http://curlpipesh.tumblr.com/) of using `curl | sudo sh`,
13please keep reading and see our disclaimer below. And feel free to use a two-step version of the installation and examine our installation script:
14
15```bash
c34b1796 16$ curl -f -L https://static.rust-lang.org/rustup.sh -O
1a4d82fc
JJ
17$ sudo sh rustup.sh
18```
19
20If you're on Windows, please download either the [32-bit
21installer](https://static.rust-lang.org/dist/rust-nightly-i686-pc-windows-gnu.exe)
22or the [64-bit
23installer](https://static.rust-lang.org/dist/rust-nightly-x86_64-pc-windows-gnu.exe)
24and run it.
25
26If you decide you don't want Rust anymore, we'll be a bit sad, but that's okay.
85aaf69f
SL
27Not every programming language is great for everyone. Just run the uninstall
28script:
1a4d82fc
JJ
29
30```bash
85aaf69f 31$ sudo /usr/local/lib/rustlib/uninstall.sh
1a4d82fc
JJ
32```
33
34If you used the Windows installer, just re-run the `.exe` and it will give you
35an uninstall option.
36
37You can re-run this script any time you want to update Rust. Which, at this
38point, is often. Rust is still pre-1.0, and so people assume that you're using
39a very recent Rust.
40
41This brings me to one other point: some people, and somewhat rightfully so, get
42very upset when we tell you to `curl | sudo sh`. And they should be! Basically,
43when you do this, you are trusting that the good people who maintain Rust
44aren't going to hack your computer and do bad things. That's a good instinct!
45If you're one of those people, please check out the documentation on [building
46Rust from Source](https://github.com/rust-lang/rust#building-from-source), or
47[the official binary downloads](http://www.rust-lang.org/install.html). And we
48promise that this method will not be the way to install Rust forever: it's just
49the easiest way to keep people updated while Rust is in its alpha state.
50
51Oh, we should also mention the officially supported platforms:
52
53* Windows (7, 8, Server 2008 R2)
54* Linux (2.6.18 or later, various distributions), x86 and x86-64
55* OSX 10.7 (Lion) or greater, x86 and x86-64
56
57We extensively test Rust on these platforms, and a few others, too, like
58Android. But these are the ones most likely to work, as they have the most
59testing.
60
61Finally, a comment about Windows. Rust considers Windows to be a first-class
62platform upon release, but if we're honest, the Windows experience isn't as
63integrated as the Linux/OS X experience is. We're working on it! If anything
64does not work, it is a bug. Please let us know if that happens. Each and every
65commit is tested against Windows just like any other platform.
66
67If you've got Rust installed, you can open up a shell, and type this:
68
69```bash
70$ rustc --version
71```
72
c34b1796 73You should see the version number, commit hash, commit date and build date:
1a4d82fc
JJ
74
75```bash
c34b1796 76rustc 1.0.0-nightly (f11f3e7ba 2015-01-04) (built 2015-01-06)
1a4d82fc
JJ
77```
78
79If you did, Rust has been installed successfully! Congrats!
80
c34b1796
AL
81This installer also installs a copy of the documentation locally, so you can
82read it offline. On UNIX systems, `/usr/local/share/doc/rust` is the location.
83On Windows, it's in a `share/doc` directory, inside wherever you installed Rust
84to.
85
1a4d82fc
JJ
86If not, there are a number of places where you can get help. The easiest is
87[the #rust IRC channel on irc.mozilla.org](irc://irc.mozilla.org/#rust), which
88you can access through
89[Mibbit](http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust). Click
90that link, and you'll be chatting with other Rustaceans (a silly nickname we
85aaf69f
SL
91call ourselves), and we can help you out. Other great resources include [the
92/r/rust subreddit](http://www.reddit.com/r/rust), and [Stack
1a4d82fc 93Overflow](http://stackoverflow.com/questions/tagged/rust).