Windows Requirements
Platform | default | fips | bindgen required? |
---|---|---|---|
x86_64-pc-windows-msvc | C/C++ Compiler, CMake & *NASM | C/C++ Compiler, CMake, NASM, Go & Ninja | No |
x86_64-pc-windows-gnu | C/C++ Compiler, CMake & *NASM | Not Supported | No |
i686-pc-windows-msvc | C/C++ Compiler, CMake & NASM | Not Supported | No |
aarch64-pc-windows-msvc | C/C++ Compiler (MSVC's clang-cl ) & CMake | Not Supported | No |
Other | Not Supported | Not Supported | N/A |
- The NASM assembler is recommended on
x86-64
platforms. NASM is required forx86
and for "fips" builds. See the Prebuilt NASM objects section below.
C/C++ Compiler
Use the following instructions to download Visual Studio Build Tools 2017 or later.
- Download the Build Tools for Visual Studio installer.
- Execute the installer.
- If you have an existing installation chose
Modify
on the existing installation. - Under
Workloads
selectVisual C++ build tools
- Under
Individual componenets
selectC++/CLI support
C++ CMake tools for Windows
- For ARM64/aarch64 support, also select:
C++ Clang Compiler for Windows
MSBuild support for LLVM (clang-cl) toolset
- Confirm selections and click
Install
CMake
- Download Windows CMake Installer
- Execute the installer
- Add the CMake installation binary directory to your PATH.
set PATH="C:\Program Files\CMake\bin;%PATH%"
NASM
- Download and install the Netwide Assembler (NASM)
- Add the NASM installation directory to your PATH
set PATH="C:\Program Files\NASM;%PATH%"
Use of prebuilt NASM objects
For Windows x86 and x86-64, NASM is required for assembly code compilation. On these platforms, we recommend that you install the NASM assembler. If NASM is detected in the build environment it is used to compile the assembly files. However, if a NASM assembler is not available, and the "fips" feature is not enabled, then the build fails unless one of the following conditions are true:
- You are building for
x86-64
and either:- The
AWS_LC_SYS_PREBUILT_NASM
environment variable is found and has a value of "1"; OR AWS_LC_SYS_PREBUILT_NASM
is not found in the environment AND the "prebuilt-nasm" feature has been enabled.
- The
If the above cases apply, then the crate provided prebuilt NASM objects will be used for the build. To prevent usage of
prebuilt NASM
objects, install NASM in the build environment and/or set the variable AWS_LC_SYS_PREBUILT_NASM
to 0
in the build
environment to prevent their use.
About prebuilt NASM objects
Prebuilt NASM objects are generated using automation similar to the crate provided pregenerated bindings. See the repositories GitHub workflow configuration for more information. The prebuilt NASM objects are checked into the repository and are available for inspection. For each PR submitted, CI verifies that the NASM objects newly built from source match the NASM objects currently in the repository.
No-assembly build
It is possible to avoid the NASM requirement by setting the AWS_LC_SYS_NO_ASM
/AWS_LC_FIPS_SYS_NO_ASM
environment
variables. However, this severely impacts performance and can only be used for un-optimized/debug builds. See the
notes in our troubleshooting section.
Ninja
- Download and install Ninja
- Add the Ninja installation directory to your PATH
set PATH="C:\ninja\ninja_build;%PATH%"
Bindgen
Bindgen is not required for most Windows targets, but it can still be used if needed.
Using bindgen
requires a libclang
or llvm
package to be installed.
See the requirements page in
[The bindgen User Guide] for instructions.
libclang / LLVM
- Download LLVM Installer
- Execute the installer
- Update your environment to set
LIBCLANG_PATH
to the bin directory inside LLVM install directory.set LIBCLANG_PATH="C:\Program Files\LLVM\bin"
bindgen-cli
cargo install --force --locked bindgen-cli
FIPS build
Building with the "fips" feature on this platform will result in the creation of shared libraries (named like
aws_lc_fips_0_xx_yy_crypto.dll
and aws_lc_fips_0_xx_yy_rust_wrapper.dll
). These shared libraries will likely need to
be distributed alongside any executable that depends on aws-lc-rs.
Troubleshooting
See our troubleshooting section.