@@ -7,4 +7,99 @@ displayed here in line with Rust's open development policy. Please open any
7
7
issues you find as usual.
8
8
</div >
9
9
10
- Coming soon. :)
10
+ ## Welcome!
11
+
12
+ Hey there! Welcome to the Rust guide. This is the place to be if you'd like to
13
+ learn how to program in Rust. Rust is a systems programming language with a
14
+ focus on "high-level, bare-metal programming": the lowest level control a
15
+ programming language can give you, but with zero-cost, higher level
16
+ abstractions, because people aren't computers. We really think Rust is
17
+ something special, and we hope you do too.
18
+
19
+ To show you how to get going with Rust, we're going to write the traditional
20
+ "Hello, World!" program. Next, we'll introduce you to a tool that's useful for
21
+ writing real-world Rust programs and libraries: "Cargo." Then, we'll show off
22
+ Rust's features by writing a little program together.
23
+
24
+ Sound good? Let's go!
25
+
26
+ ## Installing Rust
27
+
28
+ The first step to using Rust is to install it! There are a number of ways to
29
+ install Rust, but the easiest is to use the the ` rustup ` script. If you're on
30
+ Linux or a Mac, All you need to do is this:
31
+
32
+ ```
33
+ $ curl -s http://www.rust-lang.org/rustup.sh | sudo sh
34
+ ```
35
+
36
+ If you're on Windows, please [ download this .exe and run
37
+ it] ( http://static.rust-lang.org/dist/rust-nightly-install.exe ) .
38
+
39
+ If you decide you don't want Rust anymore, we'll be a bit sad, but that's okay.
40
+ Not every programming language is great for everyone. Just pass an argument to
41
+ the script:
42
+
43
+ ```
44
+ $ curl -s http://www.rust-lang.org/rustup.sh | sudo sh -s -- --uninstall
45
+ ```
46
+
47
+ If you used the Windows installer, just re-run the ` .exe ` and it will give you
48
+ an unisntall option.
49
+
50
+ You can re-run this script any time you want to update Rust. Which, at this
51
+ point, is often. Rust is still pre-1.0, and so people assume that you're using
52
+ a very recent Rust.
53
+
54
+ This brings me to one other point: some people, and somewhat rightfully so, get
55
+ very upset when we tell you to ` curl | sudo sh ` . And they should be! Basically,
56
+ when you do this, you are trusting that the good people who maintain Rust
57
+ aren't going to hack your computer and do bad things. That's a good instinct!
58
+ If you're one of those people, please check out the documentation on [ building
59
+ Rust from Source] ( https://github.com/rust-lang/rust#building-from-source ) . And
60
+ we promise that this method will not be the way to install Rust forever: it's
61
+ just the easiest way to keep people updated while Rust is in its alpha state.
62
+
63
+ Oh, we should also mention the officially supported platforms:
64
+
65
+ * Windows (7, 8, Server 2008 R2), x86 only
66
+ * Linux (2.6.18 or later, various distributions), x86 and x86-64
67
+ * OSX 10.7 (Lion) or greater, x86 and x86-64
68
+
69
+ We extensively test Rust on these platforms, and a few others, too, like
70
+ Android. But these are the ones most likely to work, as they have the most
71
+ testing.
72
+
73
+ Finally, a comment about Windows. Rust considers Windows to be a first-class
74
+ platform upon release, but if we're honest, the Windows experience isn't as
75
+ integrated as the Linux/OS X experience is. We're working on it! If anything
76
+ does not work, it is a bug. Please let us know if that happens. Each and every
77
+ commit is tested against Windows just like any other platform.
78
+
79
+ If you've got Rust installed, you can open up a shell, and type this:
80
+
81
+ ```
82
+ $ rustc --version
83
+ ```
84
+
85
+ You should see some output that looks something like this:
86
+
87
+ ```
88
+ rustc 0.11.0-pre (443a1cd 2014-06-08 14:56:52 -0700)
89
+ host: x86_64-unknown-linux-gnu
90
+ ```
91
+
92
+ If you did, Rust has been installed successfully! Congrats!
93
+
94
+ If not, there are a number of places where you can get help. The easiest is
95
+ IRC, which you can access
96
+ [ here] ( http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust ) . Click
97
+ that link, and you'll be chatting with other Rustaceans (a silly nickname we
98
+ call ourselves), and we can help you out. Other great resources include our
99
+ [ mailing list] ( https://mail.mozilla.org/listinfo/rust-dev ) ,
100
+ [ subreddit] ( http://www.reddit.com/r/rust ) , and
101
+ [ StackOverflow] ( http://stackoverflow.com/questions/tagged/rust ) .
102
+
103
+ ## Hello, world!
104
+
105
+ ## Hello, Cargo!
0 commit comments