Note: This website is archived. For up-to-date information about D projects and development, please visit

[ Message Board ]

Welcome to HaxeD

Aims to compile Haxe code to the D Programming Language (version 2.x).

License: zlib/libpng

OS: Cross-platform. Tested on Windows and Linux.


HaxeD is still in its very early stages.

  • HaxeD, and the Haxe preprocessor HaxePreD, are implemented and usable as either standalone programs or as D libraries.
  • A GOLD/Goldie grammar for the Haxe language is written and available here. The Haxe grammar does currently have a few limitations. But keep in mind, HaxeD uses the alternative grammar and a proper preprocessor (HaxePreD), so limitations #4.x and #5.x aren't applicable to HaxeD. Also, the plan is to add either LALR(k) or GLR support to Goldie, so the rest of these limitations will eventually be eliminated entirely.

HaxeD itself currently does the following (as either a standalone program or a rudimentary D library):

  • Preprocess and parse Haxe sources.
  • Automatically does the same for all imported Haxe modules.
  • Outputs a D module for each Haxe module.
  • Outputs a D class for each Haxe class.
  • Converts class member variables (except for initializers and properties).
  • Partially converts class member functions (no generics or param initializers yet, and not all statements/expressions are converted).
  • Statements and expressions that are not yet supported are not silently ignored: They result in a warning message and an emitted static assert(false, ...);.
  • Correct Haxe order-of-operators is preserved.

HaxeD currently requires at least DMD 2.058.

My top task right now is to make order-of-operators work correctly(done!). Then it's back to adding support for more statements, types, and expressions.

Message Board and Issue Tracking

...are right here on DSource.

Source Repository

The source repository is on BitBucket:


Via Mercurial (be aware, it will likely switch to Git soon):

hg clone

You'll also need the latest masters of Goldie and SemiTwistDTools (HaxeD is in such an early, quickly-changing state that the latest official Goldie release may not always be new enough):

On Windows:

git clone Goldie
git clone SemiTwistDTools
set PATH=%CD%\Goldie\bin;%CD%\SemiTwistDTools\bin;%PATH%
cd SemiTwistDTools
cd ../goldie
semitwist-stbuild all
cd ..

Linux is the same as Windows above, except use ./buildAll and set the PATH like this:


Once you've installed Goldie and SemiTwist D Tools as above, you can download and build HaxeD and HaxePreD:

hg clone
cd haxed
semitwist-stbuild all


On Windows, HaxeD seems to occasionally cause OPTLINK to crash. So if you're getting that when trying to compile HaxeD or HaxePreD, try using a different version of DMD, or building in release instead of debug, or even just retry the same build command. The relevant bug report appears to be #6144.