I was just looking at the Change Log for Haxe 3.2.0-rc.2 and found this at the end of New features list:
cpp : inititial implementation of cppia scripting
Can anyone can tell me what this means? I can tell that it has something to do with C++, but googling this gives nothing related to programming/scripting unless you count Haxe related results.
Cppia (pronounced "sepia") is a new part of the C++ target for Haxe. In the most basic sense it is a "scripting" language for hxcpp which can be compiled and run without the use of a C++ compiler. Some official documentation can be found here:
Getting started with Haxe/Cppia
In order to compile to cppia you need to modify your hxml build file. Add a -D cppia
flag to your build and change the output to have a .cppia
extension. Here is an example.
-cpp out.cppia # the cppia output file
-main Main # your Main.hx file
-D cppia # this enables cppia compilation
After you do that you compile the hxml file like normal with Haxe. It will give you a file named out.cppia
which can then be run through hxcpp using the command haxelib run hxcpp out.cppia
. One drawback to this method is there is no way to use native extensions without building your own cppia host. So if you need to run something using OpenFL or Kha you'll have to wait until they support cppia.
According to the information I've found it sounds like cppia runs as fast as Neko JIT. Considering the compile times are just as fast I can see this becoming a good alternative to the neko target in the future.
Additional information can be found in slides from a talk given by the creator, Hugh Sanderson, at WWX 2015.
http://gamehaxe.com/wwx/wwx2015.swf
A brief search only pointed out some IRC logs. Some of them are of use.
It seems like it's a specific output format for Haxe code that is designed for use in development for rapid code modifications. Say, when developing a game, the need to recompile and redeploy your application every time you make a slightest change really slows down your progress. People have reported this to be a problem with iOS development.
Cppia seems to address this with a specific code format and a JIT compiler based on SLJIT (found that in hxcpp repo). Presumably (I concluded that from the logs referenced above), it allows you to modify parts of your application at runtime.
That said, cppia as a language is probably not for direct use and is intended to be generated by the compiler.
These are the strongest clues I can come up with and I'm surely missing some details. But since the feature is pretty new, these details may even not be known right now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With