tech-kern archive

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

Re: [patch] put Lua standard libraries into the kernel



On Tue, 26 Nov 2013 12:50:16 +0100
Marc Balmer <marc%msys.ch@localhost> wrote:

> My suggestion is this:
> 
> Build with lauxlib and also build the standard libraries
> Create a new sysctl kern.lua.stdlib, set to one by default
> If a new state is created in lua(4), run lua_openlib(...) on that state
> if kern.lua.stdlib is set to a vaue != 0
> 
> So by default a kernel Lua state would then have the stdlibs available,
> much you have them available when running lua(1).

Maybe it's just me, but it seems strange to have this depend on a
(global) sysctl. I assume you have a reason for being able to disable
it. But if you then want to run other lua code that needs the stdlibs,
it will be enabled for your original code as well. Did I misunderstand?


kind regards
dieter


Home | Main Index | Thread Index | Old Index