ApacheThrift 0.22.0
Apache Thrift netstd
Thrift client library for Microsoft .NET Standard
Build the library
How to build on Windows
- Get Thrift IDL compiler executable, add to some folder and add path to this folder into PATH variable.
- Alternatively, build from source by using the cmake target "copy-thrift-compiler", which places the binary to a suitable place.
- Open the Thrift.sln project with Visual Studio and build. or
- Build with scripts
How to build on Unix/Linux
- Ensure you have a suitable .NET Core SDK installed, or use the Ubuntu docker image
- Follow common automake build practice:
./ bootstrap && ./ configure && make
Known issues
- In trace logging mode you can see some not important internal exceptions
Migration to netstd
... from netcore
If you are migrating your code from netcore library, you will have to:
- Switch to
thrift -gen netstd - the following compiler flags are no longer needed or supported:
hashcodeis now standard, whilenullableis no longer supported. - the
Thrift.TransportandThrift.Protocolnamespaces now use the singular form - add
using Thrift.Processor;in the server code where appropriate - rename all
T*ClientTransporttoT*Transport - rename all
TBaseServeroccurrences in your code toTServer - the
SingletonTProcessorFactoryis now calledTSingletonProcessorFactory - and the
AsyncBaseServeris now theTSimpleAsyncServer
You may wonder why we changed so many names. The naming scheme has been revised for two reasons: First, we want to get back the established, well-known naming consistency across the Thrift libraries which the netcore library did not fully respect. Second, by achieving that first objective, we get the additional benefit of making migration at least a bit easier for C# projects.
... from csharp
Because of the different environment requirements, migration from C# takes slightly more efforts. While the code changes related to Thrift itself are moderate, you may need to upgrade certain dependencies, components or even modules to more recent versions.
- Client and server applications must use at least framework 4.6.1, any version below will not work.
- Switch to
thrift -gen netstd. The following compiler flags are no longer needed or supported:hashcodeandasyncare now standard, whilenullableis no longer supported. - Familiarize yourself with the
async/awaitmodel, if you have not already done so. As netstd does not supportISyncanymore, async is mandatory. The synchronous model is simply no longer available (that's also the reason why we don't need theasyncflag anymore). - Consider proper use of
cancellationTokenparameters. They are optional but may be quite helpful. - As you probably already guessed, there are a few names that have been changed:
- add
using Thrift.Processor;in the server code where appropriate - the
TServerSocketis now calledTServerSocketTransport - change
IProtocolFactoryintoITProtocolFactory - if you are looking for
TSimpleServer, tryTSimpleAsyncServerinstead - similarly, the
TThreadPoolServeris now aTThreadPoolAsyncServer - the server's
Serve()method does nowServeAsync() - In case you are using Thrift server event handlers: the
SetEventHandlermethod now starts with an uppercase letter - and you will also have to revise the method names of all
TServerEventHandlerdescendants you have in your code
Showing the top 20 packages that depend on ApacheThrift.
| Packages | Downloads |
|---|---|
|
Jaeger.Communication.Thrift
Package Description
|
20 |
|
Jaeger.Communication.Thrift
Package Description
|
19 |
|
Jaeger.Communication.Thrift
Package Description
|
18 |
|
Jaeger.Communication.Thrift
Package Description
|
17 |
|
Jaeger.Communication.Thrift
Package Description
|
15 |
.NET 8.0
- Microsoft.AspNetCore.Components.Web (>= 8.0.11)
- System.Net.Http.WinHttpHandler (>= 9.0.0)
- Microsoft.Extensions.Logging.Debug (>= 9.0.0)
- Microsoft.Extensions.Logging.Console (>= 9.0.0)
- Microsoft.Extensions.Logging (>= 9.0.0)
.NET Standard 2.1
- System.Net.Http.WinHttpHandler (>= 9.0.0)
- System.IO.Pipes.AccessControl (>= 5.0.0)
- Microsoft.Extensions.Logging.Debug (>= 9.0.0)
- Microsoft.Extensions.Logging.Console (>= 9.0.0)
- Microsoft.Extensions.Logging (>= 9.0.0)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
.NET Standard 2.0
- System.Net.Http.WinHttpHandler (>= 9.0.0)
- System.IO.Pipes.AccessControl (>= 5.0.0)
- Microsoft.Extensions.Logging.Console (>= 9.0.0)
- Microsoft.Extensions.Logging (>= 9.0.0)
- Microsoft.Extensions.Logging.Debug (>= 9.0.0)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
.NET 9.0
- System.Net.Http.WinHttpHandler (>= 9.0.0)
- Microsoft.Extensions.Logging.Debug (>= 9.0.0)
- Microsoft.Extensions.Logging.Console (>= 9.0.0)
- Microsoft.Extensions.Logging (>= 9.0.0)
- Microsoft.AspNetCore.Components.Web (>= 9.0.0)
| Version | Downloads | Last updated |
|---|---|---|
| 0.22.0 | 15 | 05/28/2025 |
| 0.21.0 | 23 | 10/06/2024 |
| 0.20.0 | 17 | 10/06/2024 |
| 0.19.0 | 21 | 10/06/2024 |
| 0.18.1 | 18 | 10/06/2024 |
| 0.18.0 | 20 | 10/06/2024 |
| 0.17.0 | 18 | 10/06/2024 |
| 0.16.0 | 16 | 10/06/2024 |
| 0.15.0 | 18 | 10/06/2024 |
| 0.14.2 | 19 | 10/06/2024 |
| 0.14.1 | 23 | 10/06/2024 |
| 0.14.0 | 22 | 10/06/2024 |
| 0.13.0.1 | 19 | 10/06/2024 |
| 0.12.0.1 | 19 | 10/06/2024 |
| 0.12.0 | 24 | 10/06/2024 |
| 0.11.0 | 19 | 10/06/2024 |
| 0.10.0 | 18 | 10/06/2024 |
| 0.9.3 | 18 | 10/06/2024 |
| 0.9.2 | 20 | 10/06/2024 |