| Jens Geyer | bd52f1a | 2014-07-28 01:25:30 +0200 | [diff] [blame] | 1 | Thrift Haxe Software Library |
| 2 | |
| 3 | License |
| 4 | ======= |
| 5 | |
| 6 | Licensed to the Apache Software Foundation (ASF) under one |
| 7 | or more contributor license agreements. See the NOTICE file |
| 8 | distributed with this work for additional information |
| 9 | regarding copyright ownership. The ASF licenses this file |
| 10 | to you under the Apache License, Version 2.0 (the |
| 11 | "License"); you may not use this file except in compliance |
| 12 | with the License. You may obtain a copy of the License at |
| 13 | |
| 14 | http://www.apache.org/licenses/LICENSE-2.0 |
| 15 | |
| 16 | Unless required by applicable law or agreed to in writing, |
| 17 | software distributed under the License is distributed on an |
| 18 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 19 | KIND, either express or implied. See the License for the |
| 20 | specific language governing permissions and limitations |
| 21 | under the License. |
| 22 | |
| 23 | Using Thrift with Haxe |
| 24 | ======================== |
| 25 | |
| Jens Geyer | 662eea9 | 2015-02-01 20:20:34 +0100 | [diff] [blame^] | 26 | Thrift requires Haxe 3.1.3. Installers for Windows and OSX |
| 27 | platforms are available at `http://haxe.org/download`. |
| Jens Geyer | bd52f1a | 2014-07-28 01:25:30 +0200 | [diff] [blame] | 28 | |
| Jens Geyer | 662eea9 | 2015-02-01 20:20:34 +0100 | [diff] [blame^] | 29 | For Linux platforms it is recommended not to download the |
| 30 | binaries manually, instead use the Haxe installation shell |
| 31 | script which can be found at `http://www.openfl.org/download`. |
| 32 | |
| 33 | Thrift Haxe bindings can be set up via the `haxelib` tool |
| 34 | either from the official ASF repo, or via the github mirror. |
| Jens Geyer | b029aa8 | 2014-11-15 23:54:16 +0100 | [diff] [blame] | 35 | |
| 36 | - To set up any **stable version**, choose the appropriate branch (e.g. `0.9.3`): |
| 37 | |
| Jens Geyer | 662eea9 | 2015-02-01 20:20:34 +0100 | [diff] [blame^] | 38 | - `haxelib git thrift https://git-wip-us.apache.org/repos/asf/thrift.git 0.9.3 lib/haxe` |
| 39 | - `haxelib git thrift https://github.com/apache/thrift.git 0.9.3 lib/haxe` |
| Jens Geyer | b029aa8 | 2014-11-15 23:54:16 +0100 | [diff] [blame] | 40 | |
| 41 | - To set up the current **development version**, use the `master` branch: |
| 42 | |
| Jens Geyer | 662eea9 | 2015-02-01 20:20:34 +0100 | [diff] [blame^] | 43 | - `haxelib git thrift https://git-wip-us.apache.org/repos/asf/thrift.git master lib/haxe` |
| 44 | - `haxelib git thrift https://github.com/apache/thrift.git master lib/haxe` |
| Jens Geyer | b029aa8 | 2014-11-15 23:54:16 +0100 | [diff] [blame] | 45 | |
| 46 | As usual, the installed library can be updated using `haxelib upgrade` |
| 47 | or `haxelib update thrift`. |
| 48 | |
| 49 | In order to work with Thrift, you will need to install the Thrift compiler |
| 50 | or build from source, depending on your operating system. Appropriate |
| 51 | downloads and more information can be found at http://thrift.apache.org |
| 52 | |
| Jens Geyer | bd52f1a | 2014-07-28 01:25:30 +0200 | [diff] [blame] | 53 | To get started, visit the /tutorial/haxe and /test/haxe dirs for examples. |
| Jens Geyer | b029aa8 | 2014-11-15 23:54:16 +0100 | [diff] [blame] | 54 | If you are using HIDE or the FlashDevelop IDE, you'll find appropriate |
| 55 | project files in these folders. |
| Jens Geyer | bd52f1a | 2014-07-28 01:25:30 +0200 | [diff] [blame] | 56 | |
| 57 | |
| 58 | Current status |
| 59 | ======================== |
| 60 | - tested with Haxe C++ target |
| Jens Geyer | fea00ac | 2014-10-01 02:22:48 +0200 | [diff] [blame] | 61 | - transports: Socket, HTTP (client only), Stream |
| Jens Geyer | b029aa8 | 2014-11-15 23:54:16 +0100 | [diff] [blame] | 62 | - protocols: Binary, JSON, Multiplex |
| Jens Geyer | bd52f1a | 2014-07-28 01:25:30 +0200 | [diff] [blame] | 63 | - tutorial client and server available |
| 64 | - cross-test client and server available |
| 65 | |
| 66 | |
| 67 | Further developments |
| 68 | ======================== |
| Jens Geyer | bd52f1a | 2014-07-28 01:25:30 +0200 | [diff] [blame] | 69 | - improve to work with C#, Java and JavaScript Haxe/OpenFL targets |
| 70 | - improve to work with more (ideally all) Haxe/OpenFL targets |
| Jens Geyer | fea00ac | 2014-10-01 02:22:48 +0200 | [diff] [blame] | 71 | - add HTTP server, update tutorial and tests accordingly |
| Jens Geyer | bd52f1a | 2014-07-28 01:25:30 +0200 | [diff] [blame] | 72 | |
| 73 | |
| 74 | Dependencies |
| 75 | ======================== |
| 76 | |
| 77 | Haxe Targets: |
| 78 | Depending on the desired targets, you may have to install the appropriate HaxeLibs |
| 79 | after installing Haxe itself. For example, if you plan to target C#, Java and C++, |
| 80 | enter the following commands after installing Haxe: |
| 81 | |
| Jens Geyer | fea00ac | 2014-10-01 02:22:48 +0200 | [diff] [blame] | 82 | haxelib install hxcpp |
| 83 | haxelib install hxjava |
| 84 | haxelib install hxcs |
| Jens Geyer | bd52f1a | 2014-07-28 01:25:30 +0200 | [diff] [blame] | 85 | |
| 86 | For other targets, please consult the Haxe documentation whether or not any additional |
| 87 | target libraries need to be installed and how to achieve this. |
| 88 | |
| 89 | Haxe Libraries: |
| 90 | - None (at the time of writing) |
| 91 | |
| 92 | |
| 93 | Known restrictions |
| 94 | ======================== |
| 95 | |
| 96 | Although designed with maximum portability in mind, for technical reasons some platforms |
| 97 | may only support parts of the library, or not be compatible at all. |
| 98 | |
| 99 | Javascript: |
| 100 | - tutorial fails to build because of unsupported Sys.args |
| 101 | |