Skip to content

kokizzu/go2hx

 
 

Repository files navigation

go2hx

Compile: Go -> Haxe -> C#, C++, Java, C/Hashlink

warning: heavily experimental still a ways to go before an alpha.

Getting started

Install:

haxelib git go2hx https://github.com/go2hx/go2hx

Local file compile and interp (good for prototyping):

haxelib run go2hx ./main.go --interp

Standard library (std/go)

Supported libraries

example:

build.hxml

-m Main
-lib go2hx
--interp
import stdgo.sort.Sort.intsAreSorted;
import stdgo.unicode.Unicode.isSymbol;

function main() {
    trace(isSymbol(".".code));
    trace(intsAreSorted([30,24,67]));
}

External libraries (3rd party)

warning: most libraries will not work because of the limited supported of the standard libraries

example project

create a go mod file:

go mod init test

get the library

go get golang.org/x/example/stringutil

compile with go2hx

haxelib run go2hx golang.org/x/example/stringutil

Commendation

A spiritual successor to Tardisgo written by Elliott Stoneham, A maintainer, mentor, and code contribuitor 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.

Build from source

haxelib dev go2hx .

Look at Run.hx to see how the building occurs.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haxe 99.5%
  • Go 0.5%