Skip to content

Commit 4988e7f

Browse files
committed
Make the CRT HTTP client the default transport
USE_CRT_HTTP_CLIENT and USE_CRT_HTTP_CLIENT_ASYNC_IO now default to ON, and USE_OPENSSL defaults to OFF, so a default build sends every request through the CRT with non-blocking async I/O and links the CRT's AWS-LC instead of the system's OpenSSL. libcurl and WinHTTP still build with -DUSE_CRT_HTTP_CLIENT=OFF.
1 parent 2ac07fb commit 4988e7f

4 files changed

Lines changed: 17 additions & 8 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "breaking-change",
3+
"category": "cmake",
4+
"contributor": "sbiscigl",
5+
"description": "The CRT HTTP client is now the default transport, with non-blocking async I/O on, and the CRT uses its own crypto instead of the system's OpenSSL. A default build no longer needs libcurl, WinHTTP or OpenSSL. Set USE_CRT_HTTP_CLIENT=OFF to build libcurl or WinHTTP instead, or USE_OPENSSL=ON to use the system's OpenSSL."
6+
}

‎CMakeLists.txt‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ if (LEGACY_BUILD)
3636
option(BUILD_SHARED_LIBS "If enabled, all aws sdk libraries will be build as shared objects; otherwise all Aws libraries will be built as static objects" ON)
3737
option(FORCE_SHARED_CRT "If enabled, will unconditionally link the standard libraries in dynamically, otherwise the standard library will be linked in based on the BUILD_SHARED_LIBS setting" ON)
3838
option(SIMPLE_INSTALL "If enabled, removes all the additional indirection (platform/cpu/config) in the bin and lib directories on the install step" ON)
39-
option(USE_CRT_HTTP_CLIENT "If enabled, the common runtime HTTP client will be used, and the legacy systems such as WinHttp and libcurl will not be built or included" OFF)
40-
option(USE_CRT_HTTP_CLIENT_ASYNC_IO "If enabled (requires USE_CRT_HTTP_CLIENT), compiles in and uses the non-blocking async I/O request path. Off by default to protect existing customers; flipping it on is the release gate for the new async path." OFF)
39+
option(USE_CRT_HTTP_CLIENT "If enabled, the common runtime HTTP client will be used, and the legacy systems such as WinHttp and libcurl will not be built or included. Turn it off to build libcurl or WinHttp instead" ON)
40+
option(USE_CRT_HTTP_CLIENT_ASYNC_IO "If enabled (requires USE_CRT_HTTP_CLIENT), compiles in and uses the non-blocking async I/O request path" ON)
4141
option(NO_HTTP_CLIENT "If enabled, no platform-default http client will be included in the library. For the library to be used you will need to provide your own platform-specific implementation" OFF)
4242
option(NO_ENCRYPTION "If enabled, no platform-default encryption will be included in the library. For the library to be used you will need to provide your own platform-specific implementations" OFF)
4343
option(USE_IXML_HTTP_REQUEST_2 "If enabled on windows, the com object IXmlHttpRequest2 will be used for the http stack" OFF)
@@ -52,7 +52,7 @@ if (LEGACY_BUILD)
5252
option(ENABLE_ADDRESS_SANITIZER "Flags to enable/disable Address Sanitizer for gcc or clang" OFF)
5353
option(BYPASS_DEFAULT_PROXY "Bypass the machine's default proxy settings when using IXmlHttpRequest2" ON)
5454
option(BUILD_DEPS "Build third-party dependencies" ON)
55-
option(USE_OPENSSL "Set this if you want to use your system's OpenSSL 1.0.2/1.1.1 compatible libcrypto" ON)
55+
option(USE_OPENSSL "Set this if you want to use your system's OpenSSL 1.0.2/1.1.1 compatible libcrypto instead of the CRT's AWS-LC" OFF)
5656
option(ENABLE_CURL_LOGGING "If enabled, Curl's internal log will be piped to SDK's logger" ON)
5757
option(ENABLE_HTTP_CLIENT_TESTING "If enabled, corresponding http client test suites will be built and run" OFF)
5858
option(CUSTOM_MEMORY_MANAGEMENT "If set to ON, generates the sdk project files with custom memory management enabled, otherwise disables it" OFF)

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ AWS SDK for C++ is now in General Availability and recommended for production us
5252
**_NOTE:_** BUILD_ONLY is an optional flag used to list only the services you are using. Building the whole SDK can take a long time. Also, check out the list of [CMake parameters](./docs/CMake_Parameters.md)
5353

5454
#### Other Dependencies:
55-
To compile in Linux, you must have the header files for libcurl, libopenssl. The packages are typically available in your package manager.
55+
A default build sends requests through the CRT, which comes with the SDK, so it doesn't need libcurl or OpenSSL. To build with libcurl instead (`-DUSE_CRT_HTTP_CLIENT=OFF`) on Linux, you must have the header files for libcurl. The packages are typically available in your package manager.
5656
5757
Debian based Linux distributions example:
5858
`sudo apt-get install libcurl-dev`

‎docs/CMake_Parameters.md‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,11 @@ For more information, see the CMake documentation for your platform.
6161
### SIMPLE_INSTALL
6262
(Defaults to ON) If enabled, the install process will not insert platform-specific intermediate directories underneath bin/ and lib/. Turn OFF if you need to make multi-platform releases under a single install directory.
6363

64-
### USE_CRT_HTTP_CLIENT
65-
(Defaults to OFF) If enabled, the common runtime HTTP client will be used, and the legacy systems such as WinHttp and libcurl will not be built or included
64+
### USE_CRT_HTTP_CLIENT
65+
(Defaults to ON) If enabled, the common runtime HTTP client will be used, and the legacy systems such as WinHttp and libcurl will not be built or included. Turn it off to build libcurl or WinHttp instead. They get no new features, and new work is built and tested against the CRT.
66+
67+
### USE_CRT_HTTP_CLIENT_ASYNC_IO
68+
(Defaults to ON) If enabled, async calls on the CRT HTTP client use non-blocking I/O, so a request doesn't hold an executor thread while it waits on the network. Has no effect when USE_CRT_HTTP_CLIENT is off.
6669

6770
### NO_HTTP_CLIENT
6871
(Defaults to OFF) If enabled, prevents the default platform-specific http client from being built into the library. Turn this ON if you wish to inject your own http client implementation.
@@ -95,9 +98,9 @@ For more information, see the CMake documentation for your platform.
9598
(Defaults to ON) Build third-party dependencies
9699

97100
### USE_OPENSSL
98-
(Defaults to ON) Set this if you want to use your system's OpenSSL 1.0.2/1.1.1 compatible libcrypto
101+
(Defaults to OFF) Set this if you want to use your system's OpenSSL 1.0.2/1.1.1 compatible libcrypto instead of the CRT's own crypto.
99102

100-
If disabled, SDK will build and install [AWS-LC](https://github.com/awslabs/aws-lc) on Linux system when `BUILD_DEPS` is `ON`. This is an experimental feature. It will install AWS-LC as replacement of OpenSSL in the system default directory. Do not use if you have an OpenSSL installation in your system already.
103+
If disabled, the SDK builds [AWS-LC](https://github.com/awslabs/aws-lc) on Linux and macOS when `BUILD_DEPS` is `ON`, and installs its libcrypto alongside the SDK. If you have an OpenSSL installation in the same install prefix, install the SDK to a different prefix.
101104

102105
### ENABLE_CURL_LOGGING
103106
(Defaults to ON) If enabled, Curl's internal log will be piped to SDK's logger

0 commit comments

Comments
 (0)