Hi,
I'm (again) looking at runtime loading in Haxe. Is this possible? I'm stuck on both parts:
1) Creating some sort of artifact (ndll? DLL?) from Haxe code that contains a class I want to reuse
2) Loading that class at runtime
So far, I looked at:
- Lib.load, but it requires an NDLL, which, if I understand correctly, is something made in C++
- hscript, which doesn't allow you to define new classes
- haxelib, which requires you to specify the dependency at compile-time in your XML/config
To give a C#/Java analog of what I'm trying to do, in either of those languages, you can:
- Create a library (DLL or JAR) which contains classes
- Load that library at runtime and list classes
- Create classes from that library at runtime
(I know Haxe can do that last step using Type.createInstance)
This is useful for creating extensible architectures, like a plugin archiecture.
Any pointers would be appreciated. If it matters, I primarily care about Windows and Linux targets for this, not necessary Flash (and loading SWFs/assets).
--Ashiq