News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Lua Assembler Host

Started by Biterider, December 24, 2023, 02:09:08 AM

Previous topic - Next topic

jj2007

Quote from: Biterider on December 26, 2023, 06:52:19 PMSOF
Note: compilation in this context means byte-code generation  :icon_idea:

Got it :thumbsup:

Quoteluac is the Lua compiler. It translates programs written in the Lua programming language into binary files that can be later loaded and executed.
The main advantages of precompiling chunks are: faster loading, protecting source code from accidental user changes, and off-line syntax checking.

Precompiling does not imply faster execution because in Lua chunks are always compiled into bytecodes before being executed. luac simply allows those bytecodes to be saved in a file for later execution.

Biterider

Hi
I managed to create the static Lua libraries (64/32 bits and release/debug builds), and despite the larger libraries (posfixed with "s"), the final binary is smaller than the alternative of DLL + EXE, which is due to the removal of the unused Lua procedures that are not used by the application.

The biggest issue that took most of the time was to find the C runtime libraries and DLLs. 
On my system
;C Runtime
% includelib C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\lib\TARGET_ARCH_STRING\vcruntime.lib
% includelib C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\lib\onecore\TARGET_ARCH_STRING\libcmt.lib
% includelib C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\lib\onecore\TARGET_ARCH_STRING\oldnames.lib
% includelib C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um\TARGET_ARCH_STRING\Uuid.Lib
% includelib C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\ucrt\TARGET_ARCH_STRING\ucrt.lib

The LuaHost project can be easily converted by replacing the main .asm file (see attachment).

All libraries can be downloaded from
https://github.com/ObjAsm/ObjAsm-C.2/tree/master/Code/Lib/32/Lua
https://github.com/ObjAsm/ObjAsm-C.2/tree/master/Code/Lib/64/Lua

and the include files from 
https://github.com/ObjAsm/ObjAsm-C.2/tree/master/Code/Inc/Lua

Regards, Biterider