[ 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 http://svn.dsource.org/projects/dax/trunk Dax svn co http://svn.dsource.org/projects/semitwist/trunk 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:
./buildAll.sh
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:
-IC:\SemiTwistDTools\src
6. Build Dax.
If you have GNU wget installed, run this from the Dax directory:
Windows: build --download
Other: ./build.sh --download
If you don't have GNU wget installed, download http://ftp.digitalmars.com/dmd.2.039.zip to the Dax directory and run:
Windows: build
Other: ./build.sh
The next time you want to build Dax, all you have to do is run 'build' or './build.sh'. For a list of command-line options the buildscript supports, run 'build --help' or './build.sh --help'.
Trac
TracGuide -- Built-in Documentation
For a complete list of local wiki pages, see TitleIndex.
A related project is HaxePreD, a Haxe Preprocessor In D.