| Mark Slee | 54b7ab9 | 2007-03-06 00:06:27 +0000 | [diff] [blame] | 1 | Thrift C++ Software Library |
| 2 | |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 3 | # License |
| Bryan Duxbury | def30a6 | 2009-04-08 00:19:37 +0000 | [diff] [blame] | 4 | |
| 5 | Licensed to the Apache Software Foundation (ASF) under one |
| 6 | or more contributor license agreements. See the NOTICE file |
| 7 | distributed with this work for additional information |
| 8 | regarding copyright ownership. The ASF licenses this file |
| 9 | to you under the Apache License, Version 2.0 (the |
| 10 | "License"); you may not use this file except in compliance |
| 11 | with the License. You may obtain a copy of the License at |
| 12 | |
| 13 | http://www.apache.org/licenses/LICENSE-2.0 |
| 14 | |
| 15 | Unless required by applicable law or agreed to in writing, |
| 16 | software distributed under the License is distributed on an |
| 17 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 18 | KIND, either express or implied. See the License for the |
| 19 | specific language governing permissions and limitations |
| 20 | under the License. |
| Mark Slee | 54b7ab9 | 2007-03-06 00:06:27 +0000 | [diff] [blame] | 21 | |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 22 | # Using Thrift with C++ |
| Mark Slee | 54b7ab9 | 2007-03-06 00:06:27 +0000 | [diff] [blame] | 23 | |
| 24 | The Thrift C++ libraries are built using the GNU tools. Follow the instructions |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 25 | in the top-level README.md |
| Mark Slee | 54b7ab9 | 2007-03-06 00:06:27 +0000 | [diff] [blame] | 26 | |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 27 | In case you do not want to open another README.md file, do this thrift src: |
| 28 | |
| 29 | ./bootstrap.sh |
| 30 | ./configure (--with-boost=/usr/local) |
| 31 | make |
| 32 | sudo make install |
| Mark Slee | 54b7ab9 | 2007-03-06 00:06:27 +0000 | [diff] [blame] | 33 | |
| 34 | Thrift is divided into two libraries. |
| 35 | |
| James E. King III | c9ac8d2 | 2019-01-07 16:46:45 -0500 | [diff] [blame] | 36 | * libthrift - The core Thrift library contains all the core Thrift code. This requires |
| 37 | openssl, pthreads, and librt. |
| Mark Slee | 54b7ab9 | 2007-03-06 00:06:27 +0000 | [diff] [blame] | 38 | |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 39 | * libthriftnb - This library contains the Thrift nonblocking server, which uses libevent. |
| Mark Slee | 54b7ab9 | 2007-03-06 00:06:27 +0000 | [diff] [blame] | 40 | To link this library you will also need to link libevent. |
| 41 | |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 42 | ## Linking Against Thrift |
| Mark Slee | 54b7ab9 | 2007-03-06 00:06:27 +0000 | [diff] [blame] | 43 | |
| 44 | After you build and install Thrift the libraries are installed to |
| 45 | /usr/local/lib by default. Make sure this is in your LDPATH. |
| 46 | |
| 47 | On Linux, the best way to do this is to ensure that /usr/local/lib is in |
| 48 | your /etc/ld.so.conf and then run /sbin/ldconfig. |
| 49 | |
| 50 | Depending upon whether you are linking dynamically or statically and how |
| 51 | your build environment it set up, you may need to include additional |
| 52 | libraries when linking against thrift, such as librt and/or libpthread. If |
| 53 | you are using libthriftnb you will also need libevent. |
| 54 | |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 55 | ## Dependencies |
| Mark Slee | 54b7ab9 | 2007-03-06 00:06:27 +0000 | [diff] [blame] | 56 | |
| James E. King III | c9ac8d2 | 2019-01-07 16:46:45 -0500 | [diff] [blame] | 57 | C++11 is required at a minimum. C++03/C++98 are not supported after version 0.12.0. |
| Mark Slee | 54b7ab9 | 2007-03-06 00:06:27 +0000 | [diff] [blame] | 58 | |
| James E. King III | c9ac8d2 | 2019-01-07 16:46:45 -0500 | [diff] [blame] | 59 | Boost is required to run the C++ unit tests. It is not necessary to link against |
| 60 | the runtime library. |
| 61 | |
| 62 | libevent (for libthriftnb only) - most linux distributions have dev packages for this: |
| Mark Slee | 54b7ab9 | 2007-03-06 00:06:27 +0000 | [diff] [blame] | 63 | http://monkey.org/~provos/libevent/ |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 64 | |
| 65 | # Using Thrift with C++ on Windows |
| 66 | |
| James E. King, III | 82ae957 | 2017-08-05 12:23:54 -0400 | [diff] [blame] | 67 | Both the autoconf and cmake build systems are able to automatically detect many |
| 68 | system configurations without the need to specify library locations, however if |
| 69 | you run into problems or want to redirect thrift to build and link against your |
| 70 | own provided third party libraries: |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 71 | |
| Roger Meier | faf52db | 2014-06-09 22:41:06 +0200 | [diff] [blame] | 72 | BOOST_ROOT : For boost, e.g. D:\boost_1_55_0 |
| 73 | OPENSSL_ROOT_DIR : For OpenSSL, e.g. D:\OpenSSL-Win32 |
| 74 | |
| 75 | only required by libthriftnb: |
| 76 | |
| 77 | LIBEVENT_ROOT_DIR : For Libevent e.g. D:\libevent-2.0.21-stable |
| 78 | |
| 79 | See /3rdparty.user for more details. |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 80 | |
| James E. King, III | 82ae957 | 2017-08-05 12:23:54 -0400 | [diff] [blame] | 81 | The same linking guidelines described above for libthriftnb apply to windows as well. |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 82 | |
| 83 | ## Linking Against Thrift |
| 84 | |
| 85 | You need to link your project that uses thrift against all the thrift |
| James E. King III | c9ac8d2 | 2019-01-07 16:46:45 -0500 | [diff] [blame] | 86 | dependencies; in the case of libthrift, openssl, pthreads, and librt and for |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 87 | libthriftnb, libevent. |
| 88 | |
| 89 | In the project properties you must also set HAVE_CONFIG_H as force include |
| James E. King III | c9ac8d2 | 2019-01-07 16:46:45 -0500 | [diff] [blame] | 90 | the config header: "windows/config.h" |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 91 | |
| 92 | ## Dependencies |
| 93 | |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 94 | libevent (for libthriftnb only) |
| 95 | http://monkey.org/~provos/libevent/ |
| 96 | |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 97 | ## Windows version compatibility |
| 98 | |
| cyy | f6460fa | 2019-01-15 14:30:30 +0800 | [diff] [blame] | 99 | The Thrift library targets Windows 7 or latter versions. The supports for windows XP and Vista are avaiable until 0.12.0. |
| James E. King III | c9ac8d2 | 2019-01-07 16:46:45 -0500 | [diff] [blame] | 100 | |
| JackBoosY | 829b7d3 | 2020-01-16 00:38:15 -0800 | [diff] [blame] | 101 | ## Thrift and the VCPKG Package manager |
| 102 | |
| 103 | You can download and install thrift using the |
| 104 | [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager: |
| 105 | |
| 106 | git clone https://github.com/Microsoft/vcpkg.git |
| 107 | cd vcpkg |
| 108 | ./bootstrap-vcpkg.sh |
| 109 | ./vcpkg integrate install |
| 110 | ./vcpkg install thrift |
| 111 | |
| 112 | The thrift port in vcpkg is kept up to date by Microsoft team members |
| 113 | and community contributors. The Apache Thrift project is *not* responsible |
| 114 | for the vcpkg port. Therefore, if the version is out of date, please |
| 115 | [create an issue or pull request](https://github.com/Microsoft/vcpkg) |
| 116 | on the vcpkg repository. |
| 117 | |
| 118 | |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 119 | ## Named Pipes |
| 120 | |
| 121 | Named Pipe transport has been added in the TPipe and TPipeServer classes. This |
| 122 | is currently Windows-only. Named pipe transport for *NIX has not been |
| 123 | implemented. Domain sockets are a better choice for local IPC under non-Windows |
| 124 | OS's. *NIX named pipes only support 1:1 client-server connection. |
| 125 | |
| 126 | # Thrift/SSL |
| 127 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 128 | ## Scope |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 129 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 130 | This SSL only supports blocking mode socket I/O. It can only be used with |
| 131 | TSimpleServer, TThreadedServer, and TThreadPoolServer. |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 132 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 133 | ## Implementation |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 134 | |
| James E. King III | c9ac8d2 | 2019-01-07 16:46:45 -0500 | [diff] [blame] | 135 | There are two main classes TSSLSocketFactory and TSSLSocket. Instances of |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 136 | TSSLSocket are always created from TSSLSocketFactory. |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 137 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 138 | ## How to use SSL APIs |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 139 | |
| James E. King III | c9ac8d2 | 2019-01-07 16:46:45 -0500 | [diff] [blame] | 140 | See the TestClient.cpp and TestServer.cpp files for examples. |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 141 | |
| James E. King III | c9ac8d2 | 2019-01-07 16:46:45 -0500 | [diff] [blame] | 142 | ### AccessManager (certificate validation) |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 143 | |
| James E. King III | c9ac8d2 | 2019-01-07 16:46:45 -0500 | [diff] [blame] | 144 | An example of certificate validation can be found in TestServer.cpp. |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 145 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 146 | AccessManager defines a callback interface. It has three callback methods: |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 147 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 148 | (a) Decision verify(const sockaddr_storage& sa); |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 149 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 150 | (b) Decision verify(const string& host, const char* name, int size); |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 151 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 152 | (c) Decision verify(const sockaddr_storage& sa, const char* data, int size); |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 153 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 154 | After SSL handshake completes, additional checks are conducted. Application |
| 155 | is given the chance to decide whether or not to continue the conversation |
| 156 | with the remote. Application is queried through the above three "verify" |
| 157 | method. They are called at different points of the verification process. |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 158 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 159 | Decisions can be one of ALLOW, DENY, and SKIP. ALLOW and DENY means the |
| 160 | conversation should be continued or disconnected, respectively. ALLOW and |
| 161 | DENY decision stops the verification process. SKIP means there's no decision |
| 162 | based on the given input, continue the verification process. |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 163 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 164 | First, (a) is called with the remote IP. It is called once at the beginning. |
| 165 | "sa" is the IP address of the remote peer. |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 166 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 167 | Then, the certificate of remote peer is loaded. SubjectAltName extensions |
| 168 | are extracted and sent to application for verification. When a DNS |
| 169 | subjectAltName field is extracted, (b) is called. When an IP subjectAltName |
| 170 | field is extracted, (c) is called. |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 171 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 172 | The "host" in (b) is the value from TSocket::getHost() if this is a client |
| 173 | side socket, or TSocket::getPeerHost() if this is a server side socket. The |
| 174 | reason is client side socket initiates the connection. TSocket::getHost() |
| 175 | is the remote host name. On server side, the remote host name is unknown |
| 176 | unless it's retrieved through TSocket::getPeerHost(). Either way, "host" |
| 177 | should be the remote host name. Keep in mind, if TSocket::getPeerHost() |
| 178 | failed, it would return the remote host name in numeric format. |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 179 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 180 | If all subjectAltName extensions were "skipped", the common name field would |
| 181 | be checked. It is sent to application through (c), where "sa" is the remote |
| 182 | IP address. "data" is the IP address extracted from subjectAltName IP |
| 183 | extension, and "size" is the length of the extension data. |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 184 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 185 | If any of the above "verify" methods returned a decision ALLOW or DENY, the |
| 186 | verification process would be stopped. |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 187 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 188 | If any of the above "verify" methods returned SKIP, that decision would be |
| 189 | ignored and the verification process would move on till the last item is |
| 190 | examined. At that point, if there's still no decision, the connection is |
| 191 | terminated. |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 192 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 193 | Thread safety, an access manager should not store state information if it's |
| 194 | to be used by many SSL sockets. |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 195 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 196 | ## SIGPIPE signal |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 197 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 198 | Applications running OpenSSL over network connections may crash if SIGPIPE |
| 199 | is not ignored. This happens when they receive a connection reset by remote |
| 200 | peer exception, which somehow triggers a SIGPIPE signal. If not handled, |
| 201 | this signal would kill the application. |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 202 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 203 | ## How to run test client/server in SSL mode |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 204 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 205 | The server and client expects the followings from the directory /test/ |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 206 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 207 | - keys/server.crt |
| 208 | - keys/server.key |
| 209 | - keys/CA.pem |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 210 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 211 | The file names are hard coded in the source code. You need to create these |
| 212 | certificates before you can run the test code in SSL mode. Make sure at least |
| 213 | one of the followings is included in "keys/server.crt", |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 214 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 215 | - subjectAltName, DNS localhost |
| 216 | - subjectAltName, IP 127.0.0.1 |
| 217 | - common name, localhost |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 218 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 219 | Run within /test/ folder, |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 220 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 221 | ./cpp/TestServer --ssl & |
| 222 | ./cpp/TestClient --ssl |
| Roger Meier | 6370cfd | 2014-05-04 22:21:58 +0200 | [diff] [blame] | 223 | |
| Roger Meier | 4fba9d2 | 2014-05-04 22:34:44 +0200 | [diff] [blame] | 224 | If "-h <host>" is used to run client, the above "localhost" in the above |
| 225 | keys/server.crt has to be replaced with that host name. |
| 226 | |
| 227 | ## TSSLSocketFactory::randomize() |
| 228 | |
| 229 | The default implementation of OpenSSLSocketFactory::randomize() simply calls |
| 230 | OpenSSL's RAND_poll() when OpenSSL library is first initialized. |
| 231 | |
| 232 | The PRNG seed is key to the application security. This method should be |
| 233 | overridden if it's not strong enough for you. |
| James E. King, III | 7bc9431 | 2017-03-31 21:25:20 -0400 | [diff] [blame] | 234 | |
| CJCombrink | 4b90909 | 2024-04-27 19:51:39 +0200 | [diff] [blame] | 235 | # Thrift UUID |
| 236 | |
| 237 | The `uuid` `BaseType` is implemented in C++ by the `apache::thrift::TUuid` class. This class |
| 238 | is a strong wrapper class around an internal buffer of 16 bytes. |
| 239 | |
| 240 | The `apache::thrift::TUuid` supports construction from different UUID string representations. |
| 241 | Some examples of supported string formats are: |
| 242 | |
| 243 | * `"hhhhhhhh-hhhh-hhhh-hhhh-hhhhhhhhhhhh"` |
| 244 | * `"{hhhhhhhh-hhhh-hhhh-hhhh-hhhhhhhhhhhh}"` |
| 245 | * `"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh"` |
| 246 | * `"{hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh}"` |
| 247 | |
| 248 | ## `TUuid` and `boost::uuids::uuid` |
| 249 | |
| 250 | Internally the TUuid class is implemented using the `boost::uuids::uuid` library. As a result the TUuid |
| 251 | can seamlessly interoperate with the boost UUID type since the underlying data structure is the same. |
| 252 | |
| 253 | For convenience, when boost is already used by a project the `THRIFT_TUUID_SUPPORT_BOOST_UUID` preprocessor |
| 254 | directive can be set when including the thrift library to enable construction of a `TUuid` from a |
| 255 | `boost::uuids::uuid`. By default this is an implicit constructor that can be changed to be explicit |
| 256 | by defining the `THRIFT_TUUID_BOOST_CONSTRUCTOR_EXPLICIT` preprocessor directive. |
| 257 | |
| 258 | The thrift library does not need to be compiled differently when this constructor is needed. The preprocessor |
| 259 | directives can be set on the project that uses the thrift library. |
| 260 | |
| James E. King III | c9ac8d2 | 2019-01-07 16:46:45 -0500 | [diff] [blame] | 261 | # Deprecations |
| 262 | |
| 263 | ## 0.12.0 |
| 264 | |
| 265 | Support for C++03/C++98 was deprecated. |
| 266 | Support for Boost at runtime was deprecated. |
| 267 | |
| James E. King, III | 7bc9431 | 2017-03-31 21:25:20 -0400 | [diff] [blame] | 268 | # Breaking Changes |
| 269 | |
| James E. King III | c9ac8d2 | 2019-01-07 16:46:45 -0500 | [diff] [blame] | 270 | ## 1.0.0 |
| 271 | |
| James E. King III | 1735542 | 2019-01-11 23:06:08 -0500 | [diff] [blame] | 272 | THRIFT-4720: |
| cyy | f6460fa | 2019-01-15 14:30:30 +0800 | [diff] [blame] | 273 | The classes Monitor and TimerManager now use std::chrono::milliseconds for timeout, the methods and functions involving THRIFT_TIMESPEC and timeval have been removed, the related tests have been modified. |
| 274 | |
| 275 | Support for Windows XP/Vista has been dropped. |
| 276 | |
| James E. King III | c9ac8d2 | 2019-01-07 16:46:45 -0500 | [diff] [blame] | 277 | Support for C++03/C++98 has been dropped. Use version 0.12.0 to support that |
| 278 | language level. As a consequence, boost is no longer required as a runtime |
| 279 | library depenedency, but is is still required to build the runtime library |
| 280 | and to run the unit tests. We will work towards removing boost as a |
| 281 | build dependency for folks who just want to build the runtime and not |
| 282 | run the tests. This means the header thrift/stdcxx.h has been removed and |
| 283 | anything that relied on it has been changed to directly use C++11 concepts. |
| 284 | |
| James E. King III | 1735542 | 2019-01-11 23:06:08 -0500 | [diff] [blame] | 285 | THRIFT-4730: |
| James E. King III | c9ac8d2 | 2019-01-07 16:46:45 -0500 | [diff] [blame] | 286 | The classes BoostThreadFactory, PosixThreadFactory, StdThreadFactory, and |
| James E. King III | 278528c | 2019-01-11 12:17:44 -0500 | [diff] [blame] | 287 | PlatformThreadFactory have been removed, and we will use a ThreadFactory |
| 288 | based on C++11 (essentially StdThreadFactory was renamed ThreadFactory). |
| 289 | |
| James E. King III | 1735542 | 2019-01-11 23:06:08 -0500 | [diff] [blame] | 290 | THRIFT-4732: |
| James E. King III | 278528c | 2019-01-11 12:17:44 -0500 | [diff] [blame] | 291 | The CMake build options WITH_SHARED_LIBS and WITH_STATIC_LIBS are deprecated. |
| 292 | The project no longer performs a side-by-side static and shared build; you |
| 293 | tell CMake through BUILD_SHARED_LIBS whether to make shared or static |
| 294 | libraries now. This is CMake standard behavior. |
| James E. King III | c9ac8d2 | 2019-01-07 16:46:45 -0500 | [diff] [blame] | 295 | |
| James E. King III | 1735542 | 2019-01-11 23:06:08 -0500 | [diff] [blame] | 296 | THRIFT-4735: |
| 297 | Qt4 support was removed. |
| 298 | |
| Sebastian Zenker | 042580f | 2019-01-29 15:48:12 +0100 | [diff] [blame] | 299 | THRIFT-4762: |
| 300 | Added `const` specifier to `TTransport::getOrigin()`. This changes its function signature. |
| 301 | It's recommended to add the `override` specifier in implementations derived from `TTransport`. |
| 302 | |
| James E. King, III | 7bc9431 | 2017-03-31 21:25:20 -0400 | [diff] [blame] | 303 | ## 0.11.0 |
| 304 | |
| James E. King, III | 82ae957 | 2017-08-05 12:23:54 -0400 | [diff] [blame] | 305 | Older versions of thrift depended on the <boost/smart_ptr.hpp> classes which |
| 306 | were used in thrift headers to define interfaces. Thrift now detects C++11 |
| 307 | at build time and will prefer to use <memory> classes from C++11 instead. |
| 308 | You can force the library to build with boost memory classes by defining the |
| 309 | preprocessor macro `FORCE_BOOST_SMART_PTR`. (THRIFT-2221) |
| 310 | |
| James E. King, III | 7bc9431 | 2017-03-31 21:25:20 -0400 | [diff] [blame] | 311 | In the pthread mutex implementation, the contention profiling code was enabled |
| 312 | by default in all builds. This changed to be disabled by default. (THRIFT-4151) |
| James E. King, III | 7f5a8c2 | 2017-04-04 09:36:38 -0400 | [diff] [blame] | 313 | |
| 314 | In older releases, if a TSSLSocketFactory's lifetime was not at least as long |
| 315 | as the TSSLSockets it created, we silently reverted openssl to unsafe multithread behavior |
| 316 | and so the results were undefined. Changes were made in 0.11.0 that cause either an |
| 317 | assertion or a core instead of undefined behavior. The lifetime of a TSSLSocketFactory |
| 318 | *must* be longer than any TSSLSocket that it creates, otherwise openssl will be cleaned |
| 319 | up too early. If the static boolean is set to disable openssl initialization and |
| 320 | cleanup and leave it up to the consuming application, this requirement is not needed. |
| 321 | (THRIFT-4164) |
| 322 | |