Skip to content

elliott5/go2hx

 
 

Repository files navigation

Import Go libraries into your Haxe projects.

build Scc Count Badge Discord

Spiritual successor to Elliott Stoneham's compiler

Installation

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

Getting started

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.

Latest update on Youtube

IMAGE ALT TEXT HERE

Project status

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.

Setup from source

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

Join in on the fun!

Haxe #go2hx discord channel. Read the contributing guide for insights and information on adding code into the project.

Credits

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.

About

Go -> Haxe -> JS Java C# C++ C Python Lua

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haxe 85.3%
  • Go 14.4%
  • Shell 0.3%