Note: This website is archived. For up-to-date information about D projects and development, please visit
Version 11 (modified by jcc7, 8 years ago)
shortened Dsource links; link to HaxePreD

[ Forum ]

Welcome to Dax

Dax is based on DDMD and aims to compile D code to Haxe. Haxe, in turn, can compile down to PHP, Flash, JavaScript, NekoVM and C++.

Current Status

Dax is currently in its very early stages and the Haxe code it outputs isn't actually useful yet. However, the basic structure is in place, and it does output a partial representation of the abstract syntax tree in JSON (for viewing in any JSON-viewing program, such as JsonViewer).

Like DDMD, only Windows and Linux are currently supported. Help getting DDMD and Dax working on other OSes would certainly be appreciated, though.

Building Dax

Pre-built Windows executables are included in the subversion repository, so you can just download via subversion as described in step 2 below (you don't even need to checkout SemiTwist D Tools). If you're not on Windows or you just want to build Dax yourself, follow these steps:

1. Make sure you have current versions of these installed and available on the PATH:

  • Subversion
  • GNU patch (download Windows version here, Linux users most likely already have it installed)
  • DMC (on Windows) or GCC (other OSes)
  • DMD 2.x

2. Download the latest Dax trunk and SemiTwist D Tools trunk via subversion:

svn co Dax
svn co SemiTwistDTools

The rest of this guide will assume you checked those out to 'C:\'. If you checked them out somewhere else, adjust the paths accordingly.

3. If you're not on Windows, build SemiTwist D Tools by running this from the SemiTwistDTools directory:


4. Add 'C:\SemiTwistDTools\bin' to your PATH.

On WinXP, environment variables can be accessed by: Right-Click on "My Computer", "Properties", "Advanced" tab, "Environment Variables" button. You'll need to start a new command prompt for it to take effect. You might also need to log out and back in again. Or you can temporarily add the path just for the current session with:

set PATH=%PATH%;C:\SemiTwistDTools\bin

On Linux, the proper way to change the PATH varies by distro and version.

5. Tell DMD where to find SemiTwist D Tools.

Go to DMD's bin directory (*not* Dax's bin directory) and open sc.ini (Windows) or dmd.conf (Other). On the line that starts with DFLAGS=, add the following flag:


6. Build Dax.

If you have GNU wget installed, run this from the Dax directory:

Windows: build --download

Other: ./ --download

If you don't have GNU wget installed, download to the Dax directory and run:

Windows: build

Other: ./

The next time you want to build Dax, all you have to do is run 'build' or './'. For a list of command-line options the buildscript supports, run 'build --help' or './ --help'.


TracGuide -- Built-in Documentation

For a complete list of local wiki pages, see TitleIndex.

A related project is HaxePreD, a Haxe Preprocessor In D.