lua-users home
lua-l archive

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


It was thus said that the Great Soni L. once stated:
> 
> Lua States (from C) work well for sandboxing. I don't see why we 
> SHOULDN'T have them available as coroutines. I believe the debug API 
> should make Lua side just as powerful as C side (at least when it comes 
> to VM interaction).

  Then wrap Lua up into a module:

	lua = require "lua"

	L = lua.Lnewstate()
	L:gc('stop')
	L:Lopenlibs()
	L:gc('start')

	...

  -spc (Or instead of the entirety of Lua, just enough to sandbox like you
	can in C ... )