[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [Proposal-ish?] Lua should bind the Lua C API as a Lua module
- From: Tyler Neylon <tylerneylon@...>
- Date: Tue, 28 Nov 2017 11:03:50 -0800
Harking back to the pre-fork days of this thread, I wanted to mention
a Lua rock that implements a good chunk of Lua's C API as a Lua
module:
source: https://github.com/tylerneylon/lua_api_demo
rock: https://luarocks.org/modules/tylerneylon/apidemo
Although not at the OS level, I also wanted to mention some C example
code of sandboxing Lua in terms of CPU and memory resources. Both of
these files implement a bare-bones Lua interpreter:
memory: https://github.com/tylerneylon/APIsWithLua/blob/master/ch6/limit_memory.c
cpu (using Lua's C-level debug fns):
https://github.com/tylerneylon/APIsWithLua/blob/master/ch6/limit_cpu.c
I thought these might be of interest to Soni or others looking to
build something similar. Could be a starting point for your specific
goals?
- Tyler