On Wed, May 13, 2020 at 1:05 PM Tony Papadimitriou <
tonyp@acm.org> wrote:
BTW, has anything changed in how one statically includes modules in Lua
5.4?
I build Lua v5.3 to include sqlite3 (with lsqlite3) and lfs but with 5.4
although I get no compilation errors, and the size of the executable shows the
modules are included, I get nil for either module.
The easiest way is adding the modules' luaopen_<name> functions to the table in 'linit.c', perhaps they're missing there?
Personally I prefer to assign the luaopen_... functions to the package.preload table (LUA_PRELOAD_TABLE in the registry). The modules won't pollute the global namespace and will only be activated if 'require' is called for them. I'm trying to keep the time required to create a new lua state low.