script to compile lua module as C header file by luajit
-
compile a third party lua module as static lib named
clib
-
run lua2lib.py for the lua script in third party module named
libheader
python lua2lib.py <third party module/lua> libheader
-
compile your program with
libheader
, linkin and static link withclib
, libluajit -
and then your program can run any where without lua environment
see more exmaple