Haxe Code Cookbook
Haxe programming cookbookOtherWorking with cppia

Working with cppia

This article is about cppia, a scriptable "cpp subtarget" for Haxe. A cppia script is a "instructions assembly" script that can be run inside a cppia host and gives you fast runtime speed at near-zero compilation time. It also lets add performance critical code to the host, wich gives you full cpp runtime speed for those parts.

Information about cppia can be found in Hugh Sandersons WWX2015 talk (cppia part starts around 15:45).

This article consist of 4 pages:

  1. Working with cppia /

    A cppia script is created as any other Haxe program - with a class file (here we choose the name Script.hx) including a static main function:‥

  2. Working with cppia /

    For testing purposes, the haxelib hxcpp installation includes a Cppia host program wich can be used to test simple scripts.‥

  3. Working with cppia /

    In the previous section we learned how to create the script.cppia file needed in this example.‥

  4. Working with cppia /

    Navigate to the /bin folder and start the application from the terminal. On Windows, typically run Host.exe, and on Linux/Mac run ./Host.‥