I do not have the software engineering chops to make this happen but I am just curious if in theory from Haxe to CC65 possible. CC65 lets you write code for retro platforms using C. It comes with sample codes that can be compiled to C64 and tested in VICE emulator
" cc65 is a complete cross development package for 65(C)02 systems, including a powerful macro assembler, a C compiler, linker, archiver and several other tools. cc65 has C and runtime library support for many of the old 6502 machines. For details look at the Website."
Well, you can compile to c using HLC, but it depends … you need to compile the hl lib also with stuff like pcre2, if this is possible, im not sure - depends of the CC65’s c possibilities ?