]> git.lizzy.rs Git - rust.git/blob - src/doc/trpl/installing-rust.md
Rollup merge of #21357 - kimroen:patch-1, r=sanxiyn
[rust.git] / src / doc / trpl / installing-rust.md
1 % Installing Rust
2
3 The first step to using Rust is to install it! There are a number of ways to
4 install Rust, but the easiest is to use the `rustup` script. If you're on
5 Linux or a Mac, all you need to do is this (note that you don't need to type
6 in the `$`s, they just indicate the start of each command):
7
8 ```bash
9 $ curl -L https://static.rust-lang.org/rustup.sh | sudo sh
10 ```
11
12 If you're concerned about the [potential insecurity](http://curlpipesh.tumblr.com/) of using `curl | sudo sh`,
13 please 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
16 $ curl -L https://static.rust-lang.org/rustup.sh -O
17 $ sudo sh rustup.sh
18 ```
19
20 If you're on Windows, please download either the [32-bit
21 installer](https://static.rust-lang.org/dist/rust-nightly-i686-pc-windows-gnu.exe)
22 or the [64-bit
23 installer](https://static.rust-lang.org/dist/rust-nightly-x86_64-pc-windows-gnu.exe)
24 and run it.
25
26 If you decide you don't want Rust anymore, we'll be a bit sad, but that's okay.
27 Not every programming language is great for everyone. Just pass an argument to
28 the script:
29
30 ```bash
31 $ curl -s https://static.rust-lang.org/rustup.sh | sudo sh -s -- --uninstall
32 ```
33
34 If you used the Windows installer, just re-run the `.exe` and it will give you
35 an uninstall option.
36
37 You can re-run this script any time you want to update Rust. Which, at this
38 point, is often. Rust is still pre-1.0, and so people assume that you're using
39 a very recent Rust.
40
41 This brings me to one other point: some people, and somewhat rightfully so, get
42 very upset when we tell you to `curl | sudo sh`. And they should be! Basically,
43 when you do this, you are trusting that the good people who maintain Rust
44 aren't going to hack your computer and do bad things. That's a good instinct!
45 If you're one of those people, please check out the documentation on [building
46 Rust 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
48 promise that this method will not be the way to install Rust forever: it's just
49 the easiest way to keep people updated while Rust is in its alpha state.
50
51 Oh, 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
57 We extensively test Rust on these platforms, and a few others, too, like
58 Android. But these are the ones most likely to work, as they have the most
59 testing.
60
61 Finally, a comment about Windows. Rust considers Windows to be a first-class
62 platform upon release, but if we're honest, the Windows experience isn't as
63 integrated as the Linux/OS X experience is. We're working on it! If anything
64 does not work, it is a bug. Please let us know if that happens. Each and every
65 commit is tested against Windows just like any other platform.
66
67 If you've got Rust installed, you can open up a shell, and type this:
68
69 ```bash
70 $ rustc --version
71 ```
72
73 You should see some output that looks something like this:
74
75 ```bash
76 rustc 1.0.0-nightly (f11f3e7ba 2015-01-04 20:02:14 +0000)
77 ```
78
79 If you did, Rust has been installed successfully! Congrats!
80
81 If not, there are a number of places where you can get help. The easiest is
82 [the #rust IRC channel on irc.mozilla.org](irc://irc.mozilla.org/#rust), which
83 you can access through
84 [Mibbit](http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust). Click
85 that link, and you'll be chatting with other Rustaceans (a silly nickname we
86 call ourselves), and we can help you out. Other great resources include [our
87 forum](http://discuss.rust-lang.org/), [the /r/rust
88 subreddit](http://www.reddit.com/r/rust), and [Stack
89 Overflow](http://stackoverflow.com/questions/tagged/rust).