Skip to content

Commit 1e6b699

Browse files
committed
auto merge of #15210 : luqmana/rust/windoc, r=alexcrichton
Getting rust to build on windows can be a bit annoying in setting up all the toolchains and whatnot. The whole process is made much easier by using msys2 so let's document that prominently right on the README.
2 parents fe8bc17 + 8b83355 commit 1e6b699

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,23 @@ documentation.
5858
3. Read the [tutorial].
5959
4. Enjoy!
6060

61+
### Building on Windows
62+
63+
To easily build on windows we can use [MSYS2](http://sourceforge.net/projects/msys2/):
64+
65+
1. Grab the latest MSYS2 installer and go through the installer.
66+
2. Now from the MSYS2 terminal we want to install the mingw64 toolchain and the other
67+
tools we need.
68+
69+
$ pacman -S mingw-w64-i686-toolchain
70+
$ pacman -S base-devel
71+
72+
3. With that now start `mingw32_shell.bat` from where you installed MSYS2 (i.e. `C:\msys`).
73+
4. From there just navigate to where you have Rust's source code, configure and build it:
74+
75+
$ ./configure --build=i686-pc-mingw32
76+
$ make && make install
77+
6178
[repo]: https://github.com/rust-lang/rust
6279
[tarball]: http://static.rust-lang.org/dist/rust-nightly.tar.gz
6380
[tutorial]: http://doc.rust-lang.org/tutorial.html

0 commit comments

Comments
 (0)