tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
luactl & Lua standard libraries
Hi folks,
kernel Lua states created with luactl(8) are created empty. There has
been some discussion about it.
It would be nice to add an option to luactl to allow loading of Lua
standard libraries -- by calling luaL_openlibs on the Lua state. I
have added an option `-s` to `luactl require` that does this. See [1]
To make it clear, the following creates an empty kernel Lua state named s0:
luactl create s0
What I propose is:
luactl create s0
luactl -s require s0
or, equivalently,
luactl -cs require s0
(-c option creates s0 if it doesn't exist and then -s calls luaL_openlibs on s0)
Comments?
[1] https://netbsd.org/~salazar/patches/luactl.patch
Home |
Main Index |
Thread Index |
Old Index