On Sun, Jan 20, 2008 at 09:23:05PM +0200, Tuomo Valkonen wrote:
> Every now and then, people ask for access to random C functions
> from Lua. Providing access to all of them through Ion is the
> wrong approach that would make Ion itself bloated. But the set
> of Lua libraries isn't that big either (but be sure to check
> the LuaForge [1]).
>
> So the way to do it in that case, is to provide your own C
> bindings. Unfortunately, that's a bit cumbersome, if you have
> to write an extra Lua or Ion module in addition to your script.
> Fortunately, LuaTCC [2] provides support for inline C code in your
> Lua scripts. It is dependent on the Tiny C Compiler (TCC) [3].
> As have attached to this email, the example of the oft-requested
> 'setenv'.

<snip>

> --
> Tuomo

For the record there is also C/Invoke (http://www.nongnu.org/cinvoke/)
which has lua bindings as well as the newer (just released) Alien
(http://alien.luaforge.net/) both of which give lua ffi to C libraries
directly.

    -Etan

Reply via email to