Porting Haxe to a new OS

Hi there,

I am thinking of porting Haxe to another OS (so NOT Windows/Linux/OSX/BSD/etc…): Haiku.

Although Haiku is not a UNIX based OS, it does have a lot of similarities (not least: reasonably good POSIX compliance, Bash shell, GNU/Clang dev utils , etc…).

So I was wondering if the porting roadmap could be the following:

  1. On Linux, transpile Haxe to c or cpp
  2. Move the transpiled code to Haiku. Make the necessary modifications so a basic/bootstrap compiler can be built with gcc/g++
  3. Confirm success of boostrat compiler by compiling Haxe with the basic/bootstrap compiler.

Does that make any sense, and has it been tried before on another OS (if there are lessons learned, I would gladly read them)?

Thanks for you feedback!

Isn’t your roadmap assuming Haxe is written in Haxe? (which it’s not)

1 Like

The haxe compiler is written in Ocaml.
Haiku has an Ocaml package, so the existing build instructions should more or less work.
As for getting haxe applications running on haiku, most targets should work (assuming the runtimes for them run on haiku), and hxcpp/hashlink should be easy enough to port (given that haiku is more or less posix compliant).

Good point, I completely missed that.

I thought Haxe was self-compilable. Well, that will make things easier (maybe).
Thanks for you answer!