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