@@ -15,28 +15,34 @@ Read ["Installing Rust"] from [The Book].
15
15
## Building from Source
16
16
17
17
1 . Make sure you have installed the dependencies:
18
- * ` g++ ` 4.7 or ` clang++ ` 3.x
19
- * ` python ` 2.6 or later (but not 3.x)
20
- * GNU ` make ` 3.81 or later
21
- * ` curl `
22
- * ` git `
18
+
19
+ * ` g++ ` 4.7 or ` clang++ ` 3.x
20
+ * ` python ` 2.6 or later (but not 3.x)
21
+ * GNU ` make ` 3.81 or later
22
+ * ` curl `
23
+ * ` git `
23
24
24
25
2 . Clone the [ source] with ` git ` :
25
26
26
- $ git clone https://github.com/rust-lang/rust.git
27
- $ cd rust
27
+ ``` sh
28
+ $ git clone https://github.com/rust-lang/rust.git
29
+ $ cd rust
30
+ ```
28
31
29
32
[ source ] : https://github.com/rust-lang/rust
30
33
31
34
3 . Build and install:
32
35
33
- $ ./configure
34
- $ make && make install
36
+ ``` sh
37
+ $ ./configure
38
+ $ make && make install
39
+ ```
35
40
36
- > *** Note:*** You may need to use ` sudo make install ` if you do not normally have
37
- > permission to modify the destination directory. The install locations can
38
- > be adjusted by passing a ` --prefix ` argument to ` configure ` . Various other
39
- > options are also supported, pass ` --help ` for more information on them.
41
+ > *** Note:*** You may need to use ` sudo make install` if you do not
42
+ > normally have permission to modify the destination directory. The
43
+ > install locations can be adjusted by passing a ` --prefix` argument
44
+ > to ` configure` . Various other options are also supported – pass
45
+ > ` --help` for more information on them.
40
46
41
47
When complete, ` make install` will place several programs into
42
48
` /usr/local/bin` : ` rustc` , the Rust compiler, and ` rustdoc` , the
@@ -47,27 +53,30 @@ Read ["Installing Rust"] from [The Book].
47
53
48
54
### Building on Windows
49
55
50
- To easily build on windows we can use [ MSYS2] ( http://msys2.github.io/ ) :
56
+ [MSYS2](http://msys2.github.io/) can be used to easily build Rust on Windows :
51
57
52
58
1. Grab the latest MSYS2 installer and go through the installer.
53
- 2 . Now from the MSYS2 terminal we want to install the mingw64 toolchain and the other
54
- tools we need.
55
59
56
- ``` bash
57
- # choose one based on platform
58
- $ pacman -S mingw-w64-i686-toolchain
59
- $ pacman -S mingw-w64-x86_64-toolchain
60
+ 2. From the MSYS2 terminal, install the `mingw64` toolchain and other required
61
+ tools.
62
+
63
+ ```sh
64
+ # Choose one based on platform:
65
+ $ pacman -S mingw-w64-i686-toolchain
66
+ $ pacman -S mingw-w64-x86_64-toolchain
67
+
68
+ $ pacman -S base-devel
69
+ ```
60
70
61
- $ pacman -S base-devel
62
- ```
71
+ 3. Run `mingw32_shell.bat` or `mingw64_shell.bat` from wherever you installed
72
+ MYSY2 (i.e. `C:\msys`), depending on whether you want 32-bit or 64-bit Rust.
63
73
64
- 3 . With that now start ` mingw32_shell.bat ` or ` mingw64_shell.bat `
65
- from where you installed MSYS2 (i.e. ` C:\msys ` ). Which one you
66
- choose depends on if you want 32 or 64 bit Rust.
67
- 4 . From there just navigate to where you have Rust's source code, configure and build it:
74
+ 4. Navigate to Rust' s source code, configure and build it:
68
75
69
- $ ./configure
70
- $ make && make install
76
+ ` ` ` sh
77
+ $ ./configure
78
+ $ make && make install
79
+ ` ` `
71
80
72
81
# # Notes
73
82
@@ -92,15 +101,15 @@ There is more advice about hacking on Rust in [CONTRIBUTING.md].
92
101
93
102
[CONTRIBUTING.md]: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md
94
103
95
- ## Getting help
104
+ # # Getting Help
96
105
97
106
The Rust community congregates in a few places:
98
107
99
- * [ StackOverflow ] - Direct questions about using the language here .
100
- * [ users.rust-lang.org] - General discussion, broader questions.
108
+ * [Stack Overflow ] - Direct questions about using the language.
109
+ * [users.rust-lang.org] - General discussion and broader questions.
101
110
* [/r/rust] - News and general discussion.
102
111
103
- [ StackOverflow ] : http://stackoverflow.com/questions/tagged/rust
112
+ [Stack Overflow ]: http://stackoverflow.com/questions/tagged/rust
104
113
[/r/rust]: http://reddit.com/r/rust
105
114
[users.rust-lang.org]: http://users.rust-lang.org/
106
115
@@ -111,7 +120,7 @@ To contribute to Rust, please see [CONTRIBUTING.md](CONTRIBUTING.md).
111
120
Rust has an [IRC] culture and most real-time collaboration happens in a
112
121
variety of channels on Mozilla' s IRC network, irc.mozilla.org. The
113
122
most popular channel is [#rust], a venue for general discussion about
114
- Rust, and a good place to ask for help,
123
+ Rust, and a good place to ask for help.
115
124
116
125
[IRC]: https://en.wikipedia.org/wiki/Internet_Relay_Chat
117
126
[#rust]: irc://irc.mozilla.org/rust
0 commit comments