Today Haxe 2.04 was released.

Thanks to the hard work of Hugh Sanderson, Haxe now have support for the C++ platform.

It then mean that you can compile any Haxe program directly to C++, and get the performances of the one of the world fastest languages ! C++ support open also a lot of new possibilities for Haxe targets, including huge progress on running Haxe on iPhone

In order to use the C++ platform, you will have to use the -cpp target, but before that you need to install the hxcpp library that contains all things needed to compile. This is easily done by running the following command :

haxelib install hxcpp

Now, you can simply write a small Haxe program :

class Test { static function main ( ) { trace ( "Hello World !" ) ; } }

And compile it with :

haxe -cpp out -main Test

This will give you a file out/Test.exe that when run will simply display Hello World .

Easy, isn't it ?

In order to go further, you can use the APIs that have been made accessible from Haxe/C++, they are fully listed on the Haxe API pages.

It's of course possible to interoperate with other C++ programs, but these details will be soon documented.

Actually, C++ is the 6th platform supported by Haxe, since there is already :

Flash (for Flash Player versions <=8)

Flash9 (AVM2, for Flash Player versions >= 9)

Javascript

Neko

PHP

... and now C++

Which will be next one ? ;)