Closed ibilon closed 5 years ago
This is interesting, ive never used cppia, so what would be the benefits of using this rather than just a normal haxe app? I mean, you say you can build an app in seconds; what does that mean exactly?
I mean, you say you can build an app in seconds; what does that mean exactly?
Literally, you make your hxWidgets app, launch the compilation and a couple of seconds latter it's done.
Cppia apps are separated in the host and the script, the host is a vm for the script and the script is a form of bytecode (or ascii text file in debug mode). That makes the script really fast to compile since it's just haxe, no g++.
Here the host would contain all of hxWidgets, so it would be the host that's linked against all of wx's libraries.
This is interesting, ive never used cppia, so what would be the benefits of using this rather than just a normal haxe app?
Besides the time, which is a huge benefit (for users, if you modify the lib you have to recompile the host) you don't need g++/wx-dev just haxe (and ofc the normal wx libraries installed to run it).
edit: other explanations in https://haxe.io/roundups/wwx/2015/, http://gamehaxe.com/wwx/wwx2015.swf and https://groups.google.com/forum/#!topic/haxelang/yURC8k2fGeg
Very very interesting stuff. Is there a PoC to play with? Or is this something that requires quite alot of work before its FFP... And how do you see this fitting in with the current codebase... a separate "cppia host" app or something along those lines?
No PoC yet, having some troubles compiling the host, some weird c++ errors.
We need two things, for the client compilation changing the hxml
-cpp myapp.cppia
-D cppia
and the host, so maybe shipping one with the lib, and letting people do haxelib run hxWidgets myapp.cppia
.
Cppia for HxWidgets development would be sooo coool..!
@ibilon how far with this?
It went nowhere, cppia and externs don't mix well, mainly the enums which are used in user code (so would be in the cppia file) but require access to the externs. Probably not doable with the current system.
Looked into cppia support, would allow building a native app in seconds.
To compile a host:
haxe -cpp host -D scriptable --macro include\(\"hx.widgets\"\) -lib hxWidgets -main cpp.cppia.Host -dce no
Issues so far:
@:enum extern abstract
failsuntyped __cpp__("((wxAntialiasMode)value)")
doesn't workhx.widgets.GLCanvas
doesn't compileAnd host doesn't compile:
removing
-dce no
hides that error but doesn't give a working host.