When using MSVC Rust on Windows, everything typically works out of the box, up until you decide to do some web stuff with hyper. Suddenly a new dependency, openssl, is failing to build and you have no idea how to fix it. Fortunately this guide is here to save you!
WARNING: OpenSSL 1.1 support was only added in openssl-sys = "0.9"
. Older versions only support up to OpenSSL 1.0.2. sfackler/rust-openssl#452
- First you will need to download and install OpenSSL itself. You can download an installer from http://slproweb.com/products/Win32OpenSSL.html. In particular you want the newest version and not the light version. Make sure it matches the version of Rust you have, if you're using
x86_64-pc-windows-msvc
you will want Win64, and if you're usingi9686-pc-windows-msvc
you will want Win32. For the purpose of example I have installedWin64 OpenSSL v1.0.2h
. - If all went well you should now have OpenSSL installed somewh