Skip to content

Conversation

tobil4sk
Copy link
Member

This provides a nice improvement in responsiveness when running eval scripts, by making use of the hxb feature of haxe 5.

TODO:

  • Flag to force a rebuild the cache
  • Automatic handling of corrupt/outdated hxb cache

@Simn
Copy link
Member

Simn commented Jul 20, 2025

Ah, nice! I stopped thinking about hxb scripts when it was brought up that this would come with distribution issues because hxb is tied to a compiler version, but supporting this kind of local pre-compilation is a neat idea.

@tobil4sk
Copy link
Member Author

I stopped thinking about hxb scripts when it was brought up that this would come with distribution issues because hxb is tied to a compiler version

Yeah, being tied to a specific compiler version is a bit of an issue, especially when compared to neko which is pretty stable and is independent of haxe version. Having the option to run with a run.hl file might still be a good idea, especially for libraries that are intended to support older haxe versions.

If a library is already using an eval script, there is no reason not to apply this optimisation, although, we will have to come up with a proper mechanism to detect when the cache is mismatched with the current haxe version and requires recompilation. I was wondering if you had any ideas for this? How much of this should be handled in the compiler vs in haxelib?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants