blob: fd4debea64be5ed0ccffb6e0974ff38436673da6 [file] [log] [blame] [view]
Jens Geyerbd52f1a2014-07-28 01:25:30 +02001Thrift Haxe Software Library
2
3License
4=======
5
6Licensed to the Apache Software Foundation (ASF) under one
7or more contributor license agreements. See the NOTICE file
8distributed with this work for additional information
9regarding copyright ownership. The ASF licenses this file
10to you under the Apache License, Version 2.0 (the
11"License"); you may not use this file except in compliance
12with the License. You may obtain a copy of the License at
13
14 http://www.apache.org/licenses/LICENSE-2.0
15
16Unless required by applicable law or agreed to in writing,
17software distributed under the License is distributed on an
18"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19KIND, either express or implied. See the License for the
20specific language governing permissions and limitations
21under the License.
22
23Using Thrift with Haxe
24========================
25
Jens Geyer04488dd2015-05-14 17:16:20 +020026Haxe setup
27---------------
28
Jens Geyer662eea92015-02-01 20:20:34 +010029Thrift requires Haxe 3.1.3. Installers for Windows and OSX
30platforms are available at `http://haxe.org/download`.
Jens Geyerbd52f1a2014-07-28 01:25:30 +020031
Jens Geyer04488dd2015-05-14 17:16:20 +020032Depending on the desired targets, you may have to install the appropriate HaxeLibs
33after installing Haxe itself. For example, if you plan to target C#, Java and C++,
34enter the following commands after installing Haxe:
35
36 haxelib install hxcpp
37 haxelib install hxjava
38 haxelib install hxcs
39
40For other targets, please consult the Haxe documentation whether or not any additional
41target libraries need to be installed and how to achieve this.
42
43
44Haxe on Linux
45---------------
46
Jens Geyer662eea92015-02-01 20:20:34 +010047For Linux platforms it is recommended not to download the
48binaries manually, instead use the Haxe installation shell
49script which can be found at `http://www.openfl.org/download`.
50
Jens Geyer04488dd2015-05-14 17:16:20 +020051If you run into the error message
52
53 Uncaught exception - load.c(237) : Failed to load library : /usr/lib/neko/regexp.ndll
54 (libpcre.so.3: cannot open shared object file: No such file or directory)
55
56this can be solved depending on your OSes bitness by either
57
58 sudo ln -sf /usr/lib/libpcre.so.1 /usr/lib/libpcre.so.3
59 sudo ldconfig
60
61or
62
63 sudo ln -sf /usr/lib64/libpcre.so.1 /usr/lib64/libpcre.so.3
64 sudo ldconfig
65
66Thrift Haxe bindings
67-------------------
68
Jens Geyer662eea92015-02-01 20:20:34 +010069Thrift Haxe bindings can be set up via the `haxelib` tool
70either from the official ASF repo, or via the github mirror.
Jens Geyerb029aa82014-11-15 23:54:16 +010071
72- To set up any **stable version**, choose the appropriate branch (e.g. `0.9.3`):
73
Jens Geyer04488dd2015-05-14 17:16:20 +020074 - `haxelib git thrift https://git.apache.org/thrift.git 0.9.3 lib/haxe`
Jens Geyer662eea92015-02-01 20:20:34 +010075 - `haxelib git thrift https://github.com/apache/thrift.git 0.9.3 lib/haxe`
Jens Geyerb029aa82014-11-15 23:54:16 +010076
77- To set up the current **development version**, use the `master` branch:
78
Jens Geyer04488dd2015-05-14 17:16:20 +020079 - `haxelib git thrift https://git.apache.org/thrift.git master lib/haxe`
Jens Geyer662eea92015-02-01 20:20:34 +010080 - `haxelib git thrift https://github.com/apache/thrift.git master lib/haxe`
Jens Geyerb029aa82014-11-15 23:54:16 +010081
82As usual, the installed library can be updated using `haxelib upgrade`
83or `haxelib update thrift`.
84
85In order to work with Thrift, you will need to install the Thrift compiler
86or build from source, depending on your operating system. Appropriate
87downloads and more information can be found at http://thrift.apache.org
88
Jens Geyerbd52f1a2014-07-28 01:25:30 +020089To get started, visit the /tutorial/haxe and /test/haxe dirs for examples.
Jens Geyerb029aa82014-11-15 23:54:16 +010090If you are using HIDE or the FlashDevelop IDE, you'll find appropriate
91project files in these folders.
Jens Geyerbd52f1a2014-07-28 01:25:30 +020092
93
94Current status
95========================
96- tested with Haxe C++ target
Jens Geyerfea00ac2014-10-01 02:22:48 +020097- transports: Socket, HTTP (client only), Stream
Jens Geyer04488dd2015-05-14 17:16:20 +020098- protocols: Binary, JSON, Multiplex, Compact
Jens Geyerbd52f1a2014-07-28 01:25:30 +020099- tutorial client and server available
100- cross-test client and server available
101
102
103Further developments
104========================
Jens Geyerbd52f1a2014-07-28 01:25:30 +0200105- improve to work with C#, Java and JavaScript Haxe/OpenFL targets
106- improve to work with more (ideally all) Haxe/OpenFL targets
Jens Geyerfea00ac2014-10-01 02:22:48 +0200107- add HTTP server, update tutorial and tests accordingly
Jens Geyerbd52f1a2014-07-28 01:25:30 +0200108
109
Jens Geyerbd52f1a2014-07-28 01:25:30 +0200110Known restrictions
111========================
112
113Although designed with maximum portability in mind, for technical reasons some platforms
114may only support parts of the library, or not be compatible at all.
115
116Javascript:
117- tutorial fails to build because of unsupported Sys.args
118