tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: luactl & Lua standard libraries



> In fact we should actually remove the option to require modules into staes from the command line completely.
> After all it is up to the code being loaded to „decide“ what it requires and what not.

Agreed; I will work on it if you are not already :)

> An option to load „standard libs“ is wrong, e.g. os and math can not be available in the kernel.

luaL_openlibs just iterates through the array of 'standard modules'
and requires them individually; in the case of kernel Lua, some of
them are out -- e.g., os and math as you said. Please see
external/mit/lua/dist/src/linit.c.

Eventually, I think we should consider including them as well: last
year I ported Lua test suite to kernel Lua [1] and part of this work
was actually porting chunks of those modules.

[1] https://github.com/salazar/luatests



Home | Main Index | Thread Index | Old Index