blob: e1bf59e6c84184374e7f136359746d92e83e2ce7 [file] [log] [blame]
Mark Slee57cc25e2007-02-28 21:43:54 +00001Thrift (Thrift IDL and RPC tool)
Marc Slemko9de5a5c2006-08-23 22:34:00 +00002
3Mark Slee (mcslee@facebook.com)
4Marc Kwiatkowski (marc@facebook.com)
Mark Slee3303f362007-03-05 20:09:37 +00005Aditya Agarwal (aditya@facebook.com)
Marc Slemko9de5a5c2006-08-23 22:34:00 +00006
Mark Slee57cc25e2007-02-28 21:43:54 +00007Thrift is distributed under the Thrift open source software license.
8Please see the included LICENSE file.
Marc Slemko9de5a5c2006-08-23 22:34:00 +00009
10Introduction
11============
12
Mark Slee57cc25e2007-02-28 21:43:54 +000013Thrift is a lightweight, language-independent software stack with an
Mark Slee3303f362007-03-05 20:09:37 +000014associated code generation mechanism for RPC. Thrift provides clean
15abstractions for data transport, data serialization, and application
16level processing. The code generation system takes a simple definition
17language as its input and generates code across programming languages that
18uses the abstracted stack to build interoperable RPC clients and servers.
19
20For more details on Thrift's design and implementation, take a gander at
21the Thrift whitepaper included in this distribution or at the README files
22in a particular subdirectory of interest.
23
24Heirarchy
25=========
26
27thrift/
28
29 compiler/
30 Contains the Thrift compiler, implemented in C++.
31
32 lib/
33 Contains the Thrift software library implementation, subdivided by
34 language of implementation.
35
36 cpp/
37 java/
38 php/
39 py/
40 ruby/
41
42 test/
43
44 Contains sample Thrift files and test code across the target programming
45 languages.
46
Marc Slemko9de5a5c2006-08-23 22:34:00 +000047
48Requirements
49============
Mark Slee3303f362007-03-05 20:09:37 +000050
51Thrift requires boost shared pointers from boost-1.33.1 or greater, see:
52http://www.boost.org/libs/smart_ptr/smart_ptr.htm
53
54Some portions of Thrift also depend upon libevent, see:
55http://monkey.org/~provos/libevent/
56
57These libraries are open source and may be freely obtained, but they are not
58provided as a part of this distribution.
Marc Slemko9de5a5c2006-08-23 22:34:00 +000059
60Resources
61=========
62
63More information about Thrift can be obtained on the Thrift webpage at:
64
65 http://developers.facebook.com/thrift
66
67Acknowledgments
68===============
69
70Thrift was inspired by pillar, a lightweight RPC tool written by Adam D'Angelo
71
72INSTALLATION
73============
74
Mark Slee57cc25e2007-02-28 21:43:54 +000075If you are building from the first time out of the source repository, you will
76need to generate the configure scripts. From the top directory, do:
Marc Slemko9de5a5c2006-08-23 22:34:00 +000077
78 ./bootstrap.sh
79
Mark Slee57cc25e2007-02-28 21:43:54 +000080Once the configure scripts are generated, thrift can be configured.
81From the top directory, do:
Marc Slemko9de5a5c2006-08-23 22:34:00 +000082
83 ./configure
84
Mark Slee57cc25e2007-02-28 21:43:54 +000085You may need to specify the location of the boost files explicitly.
Mark Slee3303f362007-03-05 20:09:37 +000086If you installed boost in /usr/local, you would run configure as follows:
Marc Slemko9de5a5c2006-08-23 22:34:00 +000087
88 ./configure --with-boost=/usr/local
89
Mark Slee3303f362007-03-05 20:09:37 +000090Note that by default the thrift C++ library is typically built with debugging
91symbols included. If you want to customize these options you should use the
92CXXFLAGS option in configure, as such:
Mark Slee29050782006-09-29 00:12:30 +000093
Mark Slee3303f362007-03-05 20:09:37 +000094 ./configure CXXFLAGS='-g -O2'
Mark Slee57cc25e2007-02-28 21:43:54 +000095 ./configure CFLAGS='-g -O2'
Mark Slee3303f362007-03-05 20:09:37 +000096 ./configure CPPFLAGS='-g -O2'
Mark Slee29050782006-09-29 00:12:30 +000097
Marc Slemko9de5a5c2006-08-23 22:34:00 +000098Run ./configure --help to see other configuration options
99
100Make thrift
101
102 make
103
104From the top directory, become superuser and do:
105
106 make install