|
Yes. All of this is already possible in just Lua (limiting calls
can be done using debug hooks). The proposed "feature" is oddly
specific, tailored to a certain usecase.
What I would really like to see for simplifying sandboxing are
limits usually done at a process level: Limiting memory usage or
CPU time of Lua programs (including invoked builtin C funcs). But
I suppose that's out of scope for Lua.
Lot's of typos, sorry.
Sandboxing can be done using _ENV variable or a parameter in the "load" function for the environment.
_ENV is _G by default, which contains all functions you mentioned.
Make a table and put function you allow to useOn 16 Mar 2022, 21:59 +0300, Spar <developspartv@gmail.com>, wrote:
This is done in Lua using _ENV variable and a parameter in load function for the environment.
Pass a table to that function that doesn't have function don't want users to use