Warning
Early alpha version, not able to compile most Go code correctly
- Download Haxe 4.3.2+
- Hxcpp haxe library is required, on macos barisyild's hxcpp fork is required because of too low memory for thread stacks.
haxelib git hxcpp https://github.com/barisyild/hxcpp
haxelib git go2hx https://github.com/go2hx/go2hx
Compile a Go library (example: unicode) to Haxe with the following command line:
haxelib run go2hx unicode
Now include the outputted code into your project hxml or equivalent:
-cp golibs
-lib go2hx
You can now import the Go library and use it in your Haxe project (example: unicode):
import stdgo.unicode.Unicode;
function main() {
trace(Unicode.isGraphic('g'.code));
}
See the website for more details.
The project is currently in a early alpha state. Not able to compile most Go code. Most Go language features are extensively tested and will likely work in isolation, that are not explicated excluded such as generics and unsafe.
Clone the repo using recursive, as the project relies on git submodules.
git clone --recursive https://github.com/go2hx/go2hx
cd go2hx
haxelib dev go2hx .
haxelib run go2hx build
In case you forgot to add --recursive
:
git submodule update --init --recursive
Haxe #go2hx discord channel. Read the contributing guide for insights and information on adding code into the project.
A spiritual successor to Tardisgo written by Elliott Stoneham, A maintainer, mentor, and code contributor of this project. Elliott's wise counsel, solid engineering design, and effective programming is the core of this project and go2hx would not exist without him.