Mark Slee | 07a3aab | 2007-03-07 05:45:10 +0000 | [diff] [blame] | 1 | Thrift Tutorial |
| 2 | |
| 3 | Author: Mark Slee (mcslee@facebook.com) |
| 4 | |
| 5 | Thrift is distributed under the Thrift open source software license. |
| 6 | Please see the included LICENSE file. |
| 7 | |
| 8 | Tutorial |
| 9 | ======== |
| 10 | |
| 11 | 1) First things first, you'll need to install the Thrift compiler and the |
| 12 | language libraries. Do that using the instructions in the top level |
| 13 | README file. |
| 14 | |
| 15 | 2) Read tutorial.thrift to learn about the syntax of a Thrift file |
| 16 | |
David Reiss | d1c8682 | 2009-03-25 22:15:18 +0000 | [diff] [blame] | 17 | 3) Compile the code for the language of your choice: |
Mark Slee | 07a3aab | 2007-03-07 05:45:10 +0000 | [diff] [blame] | 18 | |
David Reiss | d1c8682 | 2009-03-25 22:15:18 +0000 | [diff] [blame] | 19 | $ thrift |
David Reiss | 4438ca5 | 2009-03-26 06:14:17 +0000 | [diff] [blame] | 20 | $ thrift -r --gen cpp tutorial.thrift |
Mark Slee | 07a3aab | 2007-03-07 05:45:10 +0000 | [diff] [blame] | 21 | |
| 22 | 4) Take a look at the generated code. |
| 23 | |
| 24 | 5) Look in the language directories for sample client/server code. |
| 25 | |
| 26 | 6) That's about it for now. This tutorial is intentionally brief. It should be |
| 27 | just enough to get you started and ready to build your own project. |