I think we all agree the file format does not matter too much - as long as we have a "reference implementation" that can read it. If we include the JNI code and hook interface in this, we can have a "hxframework" library we can all share - as long as we all commit it this.
Just to clarify the hooks, I think "run on main thread" and "run on ui thread" would be appropriate functions - not 100% sure about onRender - this seems like a more framework specific thing.
Also the config - things like screen resolution I think can be left up to the frameworks specific config files - or lack thereof. I'm not really taking about being able to share projects between frameworks, just libraries.
For small extensions (mainly just some glue code) I think we should find a source-code only solution - this will help mitigate the required-binary explosion you get on iOS. In the case of ios, we can often just use haxe meta to do the config with @:buildXml, so you already have a kind-of haxelib only solution. But for bigger extensions, or more complicated cross-platform libraries we need a more complex solution.
For me, the obvious solution is the existing cpp build.xml files. There are already a lot of small and big libraries that are built with this and since the compile flags are shared, you get compatibility with the haxe generated cpp code. To be clear, this is only for .cpp (.mm) code, not java or c# libraries or source code, assets or other config. And of course, I could be biased, so correct me if you have other ideas. Currently these are used with pre-build ndlls, git submodules, nme-dev style precompiled binaries and duelltool managed repos (not sure about Kha makefiles), so we can build on what is already there. But I think what is missing here is a workflow.
That is, the developer installs a haxelib (or clones a git repo) which comes with source, but not binaries. Ultimately they are going to want the compile binaries linked into their application, using the architecture(s) of choice. There are a few ways of going here:
1. compile into a library in the directory relative the haxelib source code, using the existing architecture naming conventions
2. recompile into objs in the project's temp directory for every project
3. configure some kind of "staging area" that can be configured per-machine or per-project to store the pre-compiled object files.
4. combine 2 and 3 by using the existing hxcpp_compile_cache code - although I'm not sure how robust this is, so this may need improving.
1 I think is easiest, but putting obj files in a source code directory is not that great a solution.
2 Could be slow - especially for bit libraries used in multiple projects
4 Needs some work, but fixing that may also help generic hxcpp code (although not so much now with DCE)
Which leaves 3 as my favourite. What I'm thinking is a hxframework function like:
useCacheDir = Framework.getDefaultCacheDir
// Tool does not care how this is generated - maybe it uses magic
pathToLibrary = Framework.findOrCreateLibrary(userCacheDir, "/path/to/extension", "architecture", ["debugflags?"] )
not sure about debug flags - maybe bool, or maybe arbitrary defines.
I think most libraries could be converted to work this way. I can also change hxcpp to write the name of the library it generates or something like that.
I would like to convert hxcpp libraries over to use this, and avoid binary distributions in hxcpp - that would be sweet. Maybe also move the getDefaultCacheDir and findOrCreateLibrary into the "hxcpp.Framework" class so I can keep these functions in sync with the hxcpp code - open to ideas.
How does this all sound? We need 100% buy-in - if there are any hold-outs please speak up otherwise we may end up with yet-another-project-solution (yaps) rather than the one-project-system-to-rule-them-all.
Hugh