+ ```sh
+ # Update package mirrors (may be needed if you have a fresh install of MSYS2)
+ pacman -Sy pacman-mirrors
+
+ # Install build tools needed for Rust. If you're building a 32-bit compiler,
+ # then replace "x86_64" below with "i686". If you've already got git, python,
+ # or CMake installed and in PATH you can remove them from this list. Note
+ # that it is important that you do **not** use the 'python2', 'cmake' and 'ninja'
+ # packages from the 'msys2' subsystem. The build has historically been known
+ # to fail with these packages.
+ pacman -S git \
+ make \
+ diffutils \
+ tar \
+ mingw-w64-x86_64-python \
+ mingw-w64-x86_64-cmake \
+ mingw-w64-x86_64-gcc \
+ mingw-w64-x86_64-ninja
+ ```
+
+4. Navigate to Rust's source code (or clone it), then build it:
+
+ ```sh
+ ./x.py build && ./x.py install
+ ```
+
+#### MSVC
+
+MSVC builds of Rust additionally require an installation of Visual Studio 2017
+(or later) so `rustc` can use its linker. The simplest way is to get the
+[Visual Studio], check the “C++ build tools” and “Windows 10 SDK” workload.
+
+[Visual Studio]: https://visualstudio.microsoft.com/downloads/
+
+(If you're installing cmake yourself, be careful that “C++ CMake tools for
+Windows” doesn't get included under “Individual components”.)
+
+With these dependencies installed, you can build the compiler in a `cmd.exe`
+shell with: