PHPackages                             apache/thrift - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. apache/thrift

ActiveLibrary[API Development](/categories/api)

apache/thrift
=============

Apache Thrift RPC system

v0.23.0(2mo ago)10.9k2.1M↓28.6%4.1k[2 issues](https://github.com/apache/thrift/issues)[8 PRs](https://github.com/apache/thrift/pulls)20Apache-2.0C++PHP ^7.1 || ^8.0CI passing

Since Mar 29Pushed yesterday444 watchersCompare

[ Source](https://github.com/apache/thrift)[ Packagist](https://packagist.org/packages/apache/thrift)[ Docs](http://thrift.apache.org)[ RSS](/packages/apache-thrift/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (6)Versions (54)Used By (20)

Apache Thrift
=============

[](#apache-thrift)

Introduction
============

[](#introduction)

Thrift is a lightweight, language-independent software stack for point-to-point RPC implementation. Thrift provides clean abstractions and implementations for data transport, data serialization, and application level processing. The code generation system takes a simple definition language as input and generates code across programming languages that uses the abstracted stack to build interoperable RPC clients and servers.

[![Apache Thrift Layered Architecture](doc/images/thrift-layers.png)](doc/images/thrift-layers.png)

Thrift makes it easy for programs written in different programming languages to share data and call remote procedures. With support for [28 programming languages](LANGUAGES.md), chances are Thrift supports the languages that you currently use.

Thrift is specifically designed to support non-atomic version changes across client and server code. This allows you to upgrade your server while still being able to service older clients; or have newer clients issue requests to older servers. An excellent community-provided write-up about thrift and compatibility when versioning an API can be found in the [Thrift Missing Guide](https://diwakergupta.github.io/thrift-missing-guide/#_versioning_compatibility).

For more details on Thrift's design and implementation, see the Thrift whitepaper included in this distribution, or at the README.md file in your particular subdirectory of interest.

Status
======

[](#status)

BranchTravisAppveyorCoverity Scancodecov.ioWebsite[`master`](https://github.com/apache/thrift/tree/master)[![Build Status](https://camo.githubusercontent.com/e6aa8bb29314a99302783d103999f48ba059c9c01b75063fdd76a2b23f1ec8a2/68747470733a2f2f6170692e7472617669732d63692e636f6d2f6170616368652f7468726966742e7376673f6272616e63683d6d6173746572)](https://app.travis-ci.com/apache/thrift/branches)[![Build status](https://camo.githubusercontent.com/458915a6684ad8ff0141fffaee9ced6bdb979daffa2b78ec1bda7c0fbbb44b1b/68747470733a2f2f63692e6170707665796f722e636f6d2f6170692f70726f6a656374732f7374617475732f6769746875622f6170616368652f7468726966743f6272616e63683d6d6173746572267376673d74727565)](https://ci.appveyor.com/project/ApacheSoftwareFoundation/thrift/history)[![Coverity Scan Build Status](https://camo.githubusercontent.com/f96995eb9c03cd9f485673694a66031014df7e7e5593e55eac7e22b5973c827f/68747470733a2f2f7363616e2e636f7665726974792e636f6d2f70726f6a656374732f313334352f62616467652e737667)](https://scan.coverity.com/projects/thrift)[![Website](https://camo.githubusercontent.com/b21ec675cd654ba70c9a18080bc468317a82f5b35e10006d2ac1399114ac10dd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6f6666696369616c2d776562736974652d627269676874677265656e2e737667)](https://thrift.apache.org/)[`0.23.0`](https://github.com/apache/thrift/tree/0.23.0)[![Build Status](https://camo.githubusercontent.com/08c6b86b173ed62d9c4d47e72ebda771bd31ba32cbc490448fc228d9133a0e95/68747470733a2f2f6170692e7472617669732d63692e636f6d2f6170616368652f7468726966742e7376673f6272616e63683d302e32332e30)](https://app.travis-ci.com/apache/thrift/branches)Releases
========

[](#releases)

Thrift does not maintain a specific release calendar at this time.

We strive to release twice yearly. Download the [current release](http://thrift.apache.org/download).

License
=======

[](#license)

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Project Hierarchy
=================

[](#project-hierarchy)

thrift/

compiler/

```
Contains the Thrift compiler, implemented in C++.

```

lib/

```
Contains the Thrift software library implementation, subdivided by
language of implementation.

cpp/
go/
java/
php/
py/
rb/
...

```

test/

```
Contains sample Thrift files and test code across the target programming
languages.

```

tutorial/

```
Contains a basic tutorial that will teach you how to develop software
using Thrift.

```

Development
===========

[](#development)

To build the same way Travis CI builds the project you should use docker. We have [comprehensive building instructions for docker](build/docker/README.md).

Requirements
============

[](#requirements)

See  for a list of build requirements (may be stale). Alternatively, see the docker build environments for a list of prerequisites.

Resources
=========

[](#resources)

More information about Thrift can be obtained on the Thrift webpage at:

```
 http://thrift.apache.org

```

Acknowledgments
===============

[](#acknowledgments)

Thrift was inspired by pillar, a lightweight RPC tool written by Adam D'Angelo, and also by Google's protocol buffers.

Installation
============

[](#installation)

If you are building from the first time out of the source repository, you will need to generate the configure scripts. (This is not necessary if you downloaded a tarball.) From the top directory, do:

```
./bootstrap.sh

```

Once the configure scripts are generated, thrift can be configured. From the top directory, do:

```
./configure

```

You may need to specify the location of the boost files explicitly. If you installed boost in `/usr/local`, you would run configure as follows:

```
./configure --with-boost=/usr/local

```

Note that by default the thrift C++ library is typically built with debugging symbols included. If you want to customize these options you should use the CXXFLAGS option in configure, as such:

```
./configure CXXFLAGS='-g -O2'
./configure CFLAGS='-g -O2'
./configure CPPFLAGS='-DDEBUG_MY_FEATURE'

```

To enable gcov required options -fprofile-arcs -ftest-coverage enable them:

```
./configure  --enable-coverage

```

Run ./configure --help to see other configuration options

Please be aware that the Python library will ignore the --prefix option and just install wherever Python's distutils puts it (usually along the lines of `/usr/lib/pythonX.Y/site-packages/`). If you need to control where the Python modules are installed, set the PY\_PREFIX variable. (DESTDIR is respected for Python and C++.)

Make thrift:

```
make

```

From the top directory, become superuser and do:

```
make install

```

Uninstall thrift:

```
make uninstall

```

Note that some language packages must be installed manually using build tools better suited to those languages (at the time of this writing, this applies to Java, Ruby, PHP).

Look for the README.md file in the lib// folder for more details on the installation of each language library package.

Package Managers
================

[](#package-managers)

Apache Thrift is available via a number of package managers, a list which is is steadily growing. A more detailed overview can be found [at the Apache Thrift web site under "Libraries"](http://thrift.apache.org/lib/)and/or in the respective READMEs for each language under /lib

Testing
=======

[](#testing)

There are a large number of client library tests that can all be run from the top-level directory.

```
make -k check

```

This will make all of the libraries (as necessary), and run through the unit tests defined in each of the client libraries. If a single language fails, the make check will continue on and provide a synopsis at the end.

To run the cross-language test suite, please run:

```
make cross

```

This will run a set of tests that use different language clients and servers.

###  Health Score

77

—

ExcellentBetter than 100% of packages

Maintenance93

Actively maintained with recent releases

Popularity76

Solid adoption and visibility

Community60

Healthy contributor diversity

Maturity72

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~111 days

Recently: every ~150 days

Total

44

Last Release

55d ago

PHP version history (4 changes)0.9.0PHP &gt;=5.3.0

v0.12.0PHP ^5.5 || ^7.0

v0.15.0PHP ^5.5 || ^7.0 || ^8.0

0.21.0.x-devPHP ^7.1 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e8969114e0f3bdd130d021357e5003be19cb0517fa3507eb6c429b020f06f16?d=identicon)[jfarrell](/maintainers/jfarrell)

![](https://www.gravatar.com/avatar/95074e3ee0768ab1c743db03197f08c34aa36d45d7291e5486b46efa09d9ffd1?d=identicon)[bufferoverflow](/maintainers/bufferoverflow)

![](https://www.gravatar.com/avatar/3aa2c9c344c925538ca0da378750c731524e4e44b482d2c585d11b3c82510c67?d=identicon)[jeking3](/maintainers/jeking3)

![](https://www.gravatar.com/avatar/5545f81e1aaedf181eb60246bbce3fae4c663270c18d092d4c2b438933abb131?d=identicon)[JensG](/maintainers/JensG)

---

Top Contributors

[![Jens-G](https://avatars.githubusercontent.com/u/5834733?v=4)](https://github.com/Jens-G "Jens-G (1241 commits)")[![bufferoverflow](https://avatars.githubusercontent.com/u/378909?v=4)](https://github.com/bufferoverflow "bufferoverflow (720 commits)")[![jfarrell](https://avatars.githubusercontent.com/u/770483?v=4)](https://github.com/jfarrell "jfarrell (354 commits)")[![jeking3](https://avatars.githubusercontent.com/u/11771245?v=4)](https://github.com/jeking3 "jeking3 (293 commits)")[![nsuke](https://avatars.githubusercontent.com/u/3064114?v=4)](https://github.com/nsuke "nsuke (243 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (166 commits)")[![emmenlau](https://avatars.githubusercontent.com/u/1098087?v=4)](https://github.com/emmenlau "emmenlau (112 commits)")[![kpumuk](https://avatars.githubusercontent.com/u/10163?v=4)](https://github.com/kpumuk "kpumuk (85 commits)")[![henrique](https://avatars.githubusercontent.com/u/128897?v=4)](https://github.com/henrique "henrique (84 commits)")[![jimexist](https://avatars.githubusercontent.com/u/622789?v=4)](https://github.com/jimexist "jimexist (70 commits)")[![hcorg](https://avatars.githubusercontent.com/u/8628672?v=4)](https://github.com/hcorg "hcorg (62 commits)")[![sveneld](https://avatars.githubusercontent.com/u/4028769?v=4)](https://github.com/sveneld "sveneld (56 commits)")[![RandyAbernethy](https://avatars.githubusercontent.com/u/6563819?v=4)](https://github.com/RandyAbernethy "RandyAbernethy (56 commits)")[![zeshuai007](https://avatars.githubusercontent.com/u/4714285?v=4)](https://github.com/zeshuai007 "zeshuai007 (44 commits)")[![CJCombrink](https://avatars.githubusercontent.com/u/1647870?v=4)](https://github.com/CJCombrink "CJCombrink (40 commits)")[![cyyever](https://avatars.githubusercontent.com/u/17618148?v=4)](https://github.com/cyyever "cyyever (40 commits)")[![allengeorge](https://avatars.githubusercontent.com/u/69364?v=4)](https://github.com/allengeorge "allengeorge (35 commits)")[![belugabehr](https://avatars.githubusercontent.com/u/12578579?v=4)](https://github.com/belugabehr "belugabehr (29 commits)")[![tjake](https://avatars.githubusercontent.com/u/44456?v=4)](https://github.com/tjake "tjake (28 commits)")[![mhlakhani](https://avatars.githubusercontent.com/u/532026?v=4)](https://github.com/mhlakhani "mhlakhani (26 commits)")

---

Tags

actionscriptccpluspluscsharpddarthttplibrarynetwork-clientnetwork-serverthriftrpc

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/apache-thrift/health.svg)

```
[![Health](https://phpackages.com/badges/apache-thrift/health.svg)](https://phpackages.com/packages/apache-thrift)
```

###  Alternatives

[grpc/grpc

gRPC library for PHP

530131.4M228](/packages/grpc-grpc)[lstrojny/fxmlrpc

Fast and tiny XML/RPC client with bridges for various HTTP clients

1465.6M32](/packages/lstrojny-fxmlrpc)[sajya/server

Easy implementation of the JSON-RPC 2.0 server for the Laravel framework.

2422.0M6](/packages/sajya-server)[jsonrpc/jsonrpc

JSON-RPC 2.0 client/server implementation

52417.4k4](/packages/jsonrpc-jsonrpc)[tivoka/tivoka

The universal JSON-RPC client/server library. JSON-RPC done right!

77163.9k3](/packages/tivoka-tivoka)[sajya/client

HTTP client and server for JSON-RPC 2.0

211.0M1](/packages/sajya-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
