[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Dynamically create Lib?
- From: Sean Conner <sean@...>
- Date: Tue, 15 Oct 2013 14:28:24 -0400
It was thus said that the Great Javier Guerra Giraldez once stated:
> On Tue, Oct 15, 2013 at 12:50 PM, Matthias Beyer <mail@beyermatthias.de> wrote:
> > Is it possible to dynamically register C functions in Lua?
>
>
> there are a few bindings to TCC around there. but beware that TCC has
> some nasty state dependencies; basically can't load C code more than
> once per run cycle!
Actually, I wrote a binding for TCC [1], and I can load and reload C code
multiple times per cycle.
-spc
[1] The following is the TCC bindings for Lua:
https://github.com/spc476/lua-conmanorg/blob/master/src/tcc.c
And a higher level binding for TCC (uses the TCC bindings, and allow
the loading of Lua modules written in C directly from source code):
https://github.com/spc476/lua-conmanorg/blob/master/lua/cc.lua