Is it possible to build cross-platform libraries with Haxe, that could be used in non-Haxe projects?
What I see is that Haxe compiler generates whole application (checked Java, C++ and C#) with my files converted to target language as well as other files, which I believe are standard library + runtime. Even if I somehow compile all these files into a "library", possibly providing a "target language friendly" interface (non-Haxe), there will still be a problem with another library (say, also made by me) defining the same functions/types causing name clashes. So ideally, I'd like "runtime" to exist in a private namespace/package.
I tried dce=no and looking at generated files it seems it would let me turn common code into a separate shared library, but I have no idea how stable it would be (will one library compiled against one "runtime" be compatible with a newer version?).
Additionally, if creating libraries is possible, should I be concerned with some global state that needs to be initialized or anything?
Thank you!