AegisubDC icon indicating copy to clipboard operation
AegisubDC copied to clipboard

Dynamically link moonjit

Open ghost opened this issue 2 years ago • 4 comments

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.)

ghost avatar Jan 04 '22 08:01 ghost

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

Ristellise avatar Jan 08 '22 07:01 Ristellise

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

Ristellise avatar Jan 08 '22 08:01 Ristellise

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

ghost avatar Jan 09 '22 03:01 ghost

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.

Ristellise avatar Jan 09 '22 11:01 Ristellise