mingw-w64 can be easily installed by using [MSYS2](http://msys2.github.io/). Install MSYS2 according to the instructions, and then, from an MSYS2 Shell, install mingw-w64:
Once a precompiled binary is installed you can configure this crate to find the
installation via an environment variable:
32-bit:
```bash
pacman -S mingw-w64-i686-gcc
```
64-bit
```bash
pacman -S mingw-w64-x86_64-gcc
set OPENSSL_DIR=C:\OpenSSL-Win64
```
and then install the mingw-w64 toolchain.
After that, you're just a `cargo build` away!
32-bit:
```bash
pacman -S mingw-w64-i686-toolchain
```
### Windows GNU (MinGW)
64-bit:
```bash
pacman -S mingw-w64-x86_64-toolchain
```
The easiest way to acquire OpenSSL when working with MinGW is to ensure you're
using [MSYS2](http://msys2.github.io) and to then execute:
Alternatively, install OpenSSL from [here][1]. Cargo will not be able to find OpenSSL if it's
installed to the default location. You can either copy the `include/openssl`
directory, `libssl32.dll`, and `libeay32.dll` to locations that Cargo can find
or pass the location to Cargo via environment variables: