Mark Slee | 57cc25e | 2007-02-28 21:43:54 +0000 | [diff] [blame] | 1 | Thrift (Thrift IDL and RPC tool) |
Marc Slemko | 9de5a5c | 2006-08-23 22:34:00 +0000 | [diff] [blame] | 2 | |
| 3 | Mark Slee (mcslee@facebook.com) |
| 4 | Marc Kwiatkowski (marc@facebook.com) |
Mark Slee | 3303f36 | 2007-03-05 20:09:37 +0000 | [diff] [blame^] | 5 | Aditya Agarwal (aditya@facebook.com) |
Marc Slemko | 9de5a5c | 2006-08-23 22:34:00 +0000 | [diff] [blame] | 6 | |
Mark Slee | 57cc25e | 2007-02-28 21:43:54 +0000 | [diff] [blame] | 7 | Thrift is distributed under the Thrift open source software license. |
| 8 | Please see the included LICENSE file. |
Marc Slemko | 9de5a5c | 2006-08-23 22:34:00 +0000 | [diff] [blame] | 9 | |
| 10 | Introduction |
| 11 | ============ |
| 12 | |
Mark Slee | 57cc25e | 2007-02-28 21:43:54 +0000 | [diff] [blame] | 13 | Thrift is a lightweight, language-independent software stack with an |
Mark Slee | 3303f36 | 2007-03-05 20:09:37 +0000 | [diff] [blame^] | 14 | associated code generation mechanism for RPC. Thrift provides clean |
| 15 | abstractions for data transport, data serialization, and application |
| 16 | level processing. The code generation system takes a simple definition |
| 17 | language as its input and generates code across programming languages that |
| 18 | uses the abstracted stack to build interoperable RPC clients and servers. |
| 19 | |
| 20 | For more details on Thrift's design and implementation, take a gander at |
| 21 | the Thrift whitepaper included in this distribution or at the README files |
| 22 | in a particular subdirectory of interest. |
| 23 | |
| 24 | Heirarchy |
| 25 | ========= |
| 26 | |
| 27 | thrift/ |
| 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 Slemko | 9de5a5c | 2006-08-23 22:34:00 +0000 | [diff] [blame] | 47 | |
| 48 | Requirements |
| 49 | ============ |
Mark Slee | 3303f36 | 2007-03-05 20:09:37 +0000 | [diff] [blame^] | 50 | |
| 51 | Thrift requires boost shared pointers from boost-1.33.1 or greater, see: |
| 52 | http://www.boost.org/libs/smart_ptr/smart_ptr.htm |
| 53 | |
| 54 | Some portions of Thrift also depend upon libevent, see: |
| 55 | http://monkey.org/~provos/libevent/ |
| 56 | |
| 57 | These libraries are open source and may be freely obtained, but they are not |
| 58 | provided as a part of this distribution. |
Marc Slemko | 9de5a5c | 2006-08-23 22:34:00 +0000 | [diff] [blame] | 59 | |
| 60 | Resources |
| 61 | ========= |
| 62 | |
| 63 | More information about Thrift can be obtained on the Thrift webpage at: |
| 64 | |
| 65 | http://developers.facebook.com/thrift |
| 66 | |
| 67 | Acknowledgments |
| 68 | =============== |
| 69 | |
| 70 | Thrift was inspired by pillar, a lightweight RPC tool written by Adam D'Angelo |
| 71 | |
| 72 | INSTALLATION |
| 73 | ============ |
| 74 | |
Mark Slee | 57cc25e | 2007-02-28 21:43:54 +0000 | [diff] [blame] | 75 | If you are building from the first time out of the source repository, you will |
| 76 | need to generate the configure scripts. From the top directory, do: |
Marc Slemko | 9de5a5c | 2006-08-23 22:34:00 +0000 | [diff] [blame] | 77 | |
| 78 | ./bootstrap.sh |
| 79 | |
Mark Slee | 57cc25e | 2007-02-28 21:43:54 +0000 | [diff] [blame] | 80 | Once the configure scripts are generated, thrift can be configured. |
| 81 | From the top directory, do: |
Marc Slemko | 9de5a5c | 2006-08-23 22:34:00 +0000 | [diff] [blame] | 82 | |
| 83 | ./configure |
| 84 | |
Mark Slee | 57cc25e | 2007-02-28 21:43:54 +0000 | [diff] [blame] | 85 | You may need to specify the location of the boost files explicitly. |
Mark Slee | 3303f36 | 2007-03-05 20:09:37 +0000 | [diff] [blame^] | 86 | If you installed boost in /usr/local, you would run configure as follows: |
Marc Slemko | 9de5a5c | 2006-08-23 22:34:00 +0000 | [diff] [blame] | 87 | |
| 88 | ./configure --with-boost=/usr/local |
| 89 | |
Mark Slee | 3303f36 | 2007-03-05 20:09:37 +0000 | [diff] [blame^] | 90 | Note that by default the thrift C++ library is typically built with debugging |
| 91 | symbols included. If you want to customize these options you should use the |
| 92 | CXXFLAGS option in configure, as such: |
Mark Slee | 2905078 | 2006-09-29 00:12:30 +0000 | [diff] [blame] | 93 | |
Mark Slee | 3303f36 | 2007-03-05 20:09:37 +0000 | [diff] [blame^] | 94 | ./configure CXXFLAGS='-g -O2' |
Mark Slee | 57cc25e | 2007-02-28 21:43:54 +0000 | [diff] [blame] | 95 | ./configure CFLAGS='-g -O2' |
Mark Slee | 3303f36 | 2007-03-05 20:09:37 +0000 | [diff] [blame^] | 96 | ./configure CPPFLAGS='-g -O2' |
Mark Slee | 2905078 | 2006-09-29 00:12:30 +0000 | [diff] [blame] | 97 | |
Marc Slemko | 9de5a5c | 2006-08-23 22:34:00 +0000 | [diff] [blame] | 98 | Run ./configure --help to see other configuration options |
| 99 | |
| 100 | Make thrift |
| 101 | |
| 102 | make |
| 103 | |
| 104 | From the top directory, become superuser and do: |
| 105 | |
| 106 | make install |