Ristellise / AegisubDC

Aegisub, Daydream Cafe Edition
Other
282 stars 31 forks source link

Dynamically link moonjit #43

Open ghost opened 2 years ago

ghost commented 2 years ago

Hi! Currently in AegisubDC, moonjit is statically linked. It is somewhat inconvenient to write modules using Lua C API. Such modules are also required to statically link to moonjit, increasing the size, and compatibility of lua_State need to be taken care of. An example is a toy I wrote. So how about making moonjit dynamically linked. i.e. build a DLL for moonjit, let Aegisub dynamically link to it, and modules can also link to the DLL and do not need to bring a statically linked moonjit runtime anymore. (I know we can use FFI to write C extensions; however, I prefer using Lua C API, and it should be an option.)

Ristellise commented 2 years ago

I dare you to try compiling luajit VC project yourself and release a Aegisub build.

Ristellise commented 2 years ago

After some annoyance, managed to get it build as a dll. For next version, link it as luajit.dll

ghost commented 2 years ago

BTW, I think luajit-minilua and luajit-buildvm should not be included in installation, as they are just intermediate.

Ristellise commented 2 years ago

BTW, I think luajit-minilua and luajit-buildvm should not be included in installation, as they are just intermediate.

Noted. will remove them from releases.