Hi,
I have put some experimental stuff in have v3 for compiling to dynamic libraries. It goes like this:
1. compile your "engine", plus any libraries (eg, physics) into an app, but give the it the "-D dll_export" define. This generates an "external" directory for you that you use in phase 2.
2. Compile the "app specific" stuff into a dll by using the "-D dll_import=import_dir", and a class path pointing to your previously generated externs. The import_dir is to give the dll something to link against - eg, the link.lib generated by the windows compiler.
Phase 2 creates a dll that you can use from within your app like this:
var name = dir + "/assets/" + nme.installer.Assets.getResourceName("Client.ios.dylib");
untyped __global__.__hxcpp_run_dll(name,"__main__");
The hxcpp_run_dl code can run from a file on disk, so then it is up to some library code to get this file - eg, as a resource (shown here) but there is no reason why you could not download it from the internet or upload it over a socket.
Because the dll can be run at any time, you could have a full nme loader screen with options and graphics etc, before you run the dll, where you could select the dll version etc.
The dll only contains the app files that you have not put into the loader/library, so it is very fast and very small. It is true native and runs at 100% native speed.
Similarly, the "dynamic update" code of
spaceport.io could "easily" be done with library code:
nme.Asset.getBitmap("asdasda")
becomes:
mylib.DynamicAsset.getBitmap("asdasda", onChangeCallback = null)
And you can establish a socket connection and transfer data etc (the hxcpp debug socket does something like this). So you could also transfer the dll and maybe mix in the debugger code for icing on the cake.
This also gives someone the opportunity to generate a loader app and externs, and create host that could be used by many developers.
Since the app code does not need to rebuild the hxcpp runtime, it may be possible to get away with a smaller subset of compiler files on the developers disk. Eg, you do not need to link against any ios runtime files (since you link against the hxcpp loader app, which links against them) so cross-compiling may be easier.
The code is still experimental, but it works on all targets with a bit of love. You will not be able to sell an ios app like this on the app store but the good thing about this is that you can just recompile exactly the same code into an app once you are satisfied.
So I can offer some assistance in getting the compiler features going, but the other stuff (eg, dynamic update) is simply haxe code that could be written by anyone and does not need to be part of the NME framework.
Just write this function using a socket:
mylib.DynamicAsset.getBitmap("asdasda", onChangeCallback = null)
and you have done dynamic asset updating. Once you have this, it can be extended to dlls.
I'm also thinking it may be possible to use these externs and combine them with a VM already supported by haxe (v8/neko/as3) to have a hybrid version where most stuff in done in hxcpp, and some stuff can be done in vm for a speed/update tradeoff, but there is still some work to be done meshing the hxcpp runtime with the vm gc etc.
Hugh