Facebook's branch of Apache Thrift, including a new C++ server.
C++ Java Python Hack D Ruby Other
Latest commit 8122461 Sep 27, 2016 @yfeldblum yfeldblum committed with Facebook Github Bot 3 Refactor legacy-reflection to compress error lines
[Thrift] Refactor legacy-reflection to compress error lines.

When compiling programs that use legacy-reflection via static-reflection, it is ideal to reduce the number of compiler errors when there are types in play for which the static-reflection metatypes are missing. This diff does that - not 100%, but decently enough.

This helps immensely when the Thrift structures in play have many transitively-nested types from many transitively-included `.thrift` files to reduce the number of compiler-errors, helping the programmer find the signal in the noise of which are the types for which static-reflection metatypes are missing and must be added.

Reviewed By: juchem

Differential Revision: D3881977

fbshipit-source-id: 3d079102a6283215a8d5691a2856925266e8c1cb


FBThrift: Facebook's branch of apache thrift Build Status

The main focus of this package is the new C++ server, under thrift/lib/cpp2. This repo also contains a branch of the rest of apache thrift's repo with any changes Facebook has made, however the build system only supports cpp2.

Apache thrift is at https://thrift.apache.org/


Note that under GCC, you probably need at least 2GB of memory to compile fbthrift. If you see 'internal compiler error', this is probably because you ran out of memory during compilation.


  • Facebook's folly library: https://github.com/facebook/folly

  • In addition to the packages required for building folly, Ubuntu 13.10 and 14.04 require the following packages (feel free to cut and paste the apt-get command below):

  sudo apt-get install \
      flex \
      bison \
      libkrb5-dev \
      libsasl2-dev \
      libnuma-dev \
      pkg-config \

For your convenience script are provided to install fbthrift's dependencies on several common platforms:

cd fbthrift/thrift/
# Or ./build/deps_ubuntu_12.04.sh or ./build/deps_centos.sh
autoreconf -if && ./configure && make

Each deps_*.sh script will install a variety of base system packages, as well as compile and install into in /usr/local some from-source dependencies (like folly).

  • Ubuntu 14.04 64-bit requires the following packages:

    • make
    • autoconf
    • libtool
    • g++
    • libboost-dev-all
    • libevent-dev
    • flex
    • bison
    • libgoogle-glog-dev
    • libdouble-conversion-dev
    • scons
    • libkrb5-dev
    • libsnappy-dev
    • libsasl2-dev


Some docs on the new cpp2 server are at: https://github.com/facebook/fbthrift/blob/master/thrift/doc/Cpp2.md