-
-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use HashLink to run Lime tools #1614
Conversation
Oh, HashLink isn't even installed for CI. That's another problem for later. |
Will Haxe ever bundle HashLink the same way that Neko does? I don't really have evidence either way, but my gut feeling is no. I suspect that the built-in Haxe interpreter is intended as the true spiritual successor to Neko for running things like Lime tools. |
Is the interpreter really fast enough to be practical? The Lime tools may delegate most of the work to Haxe/GCC/Gradle/Xcode/whatever, but they still do some heavy lifting themselves. I guess the interpreter is worth a shot. I'm certainly hoping Haxe will bundle HashLink at some point, but signs point to that being a long way off. Among other things, Haxelib doesn't accept run.hl as an alternative to run.n. |
I looked into the "Failed to load library lime.hdll" error, and it looks like it's completely unrelated to According to This error has been reported a couple times and was usually concluded to have to do with project setup, so I'm hoping that's what it is here. Once, it was suggested that the user was using the wrong version of HashLink, so perhaps there's some kind of version incompatibility going on. I built Haxe from source to debug a prior error, so maybe it's now incompatible. In the meantime, could someone try running |
Looking at https://benchs.haxe.org/, Eval is actually slightly faster than neko.
Copying to the current directory only helps on Windows, on Linux it usually won't work.
Building Haxe from source shouldn't make a difference, at least not for this specific error.
Works for me, both with lime and with my global HL install. |
Seems the error was some incompatibility between the official HashLink binary and my built-from-source copy of Haxe. Lime apps (using Lime's bundled version of HashLink) could access I also discovered that Lime's bundled HL binary can open lime.hdll, but only attempts to load it from the current directory. Maybe that's special behavior when you request "./lime.hdll" rather than "lime.hdll"? (I don't know why it's hard-coding the dot, but it is.)
Excellent. That seems a lot easier than solving the HL bundling problem. |
Nope, it actually incurs a ~2 second pause on startup. Maybe it's processing macros, which would normally happen when compiling but now must happen every time. |
Not macros, it's parsing, typing and all the other normal compiler stuff that causes the slowdown. |
Makes sense. At least it was easy to get working and doesn't rely on a bundled VM. |
That's strange, I wouldn't have expected that error to be in any way related to the Haxe version.
Loading from the working directory is not what it's supposed to do. |
I wonder if my HashLink install is just broken. If I run Also weird:
The function takes a string argument that could already contain a dot. |
HashLink is the future of Haxe VMs, whereas Neko is unsupported and causes issues like #1307.
Unfortunately, this pull request currently doesn't work because the tools can't load lime.hdll. I assume this is because the ndll-loading code is written for Neko:
Does anyone know the HashLink equivalent? There's no such thing as
hl.Lib
...