Can I precompile the haxelib library so that it does not recompile every time I build the project?

I am building a game with Haxe and NME. My code compiled pretty quickly, but then I added the Nape physics engine with haxelib, and now my compilation time has increased quite a lot.

My guess is that the Nape library is recompiled every time, because it looks like a single swf file, and deleting the library reduces the compilation time to what it was.

Can I compile Nape once and not rewrite it every time I build it? Is the solution great for the Neko goal?

+4
source share
2 answers

I don't use NME, so I'm not sure how this fits into the NME build tools, but with simple haxe you would use a build server, for example:

haxe --wait 4000 

to start the server, and then when creating add

 --connect 4000 

While the build server is up and running, the compiler caches the results of compiling the modules, so things like the back of the head will only be compiled for the first time, and until the code is changed, only the compiler only generates .swf

+8
source

It is great for OpenFL / NME tools.

 haxe --wait 5000 openfl build flash --connect 5000 

But note that this may not work at the moment:

 openfl build windows|mac|linux|android|ios|blackberry --connect 5000 

This feature is currently not supported for cpp purposes.

0
source

All Articles