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 Sean Conner once stated:
> 
>   I wrote Lua bindings to TCC [1][2] so now I can compile C code from within
> Lua.  I then wrote another module [3] to provide a better interface over the
> TCC module, as well as extend require() to allow the loading of Lua modules
> from C source (it compiles them directly into memory).  It's not quite what
> you are asking for, but ... 

  And you can see it used in my JSON parser:
	https://github.com/spc476/LPeg-Parsers/blob/master/json.lua

> [1]	http://en.wikipedia.org/wiki/Tiny_C_Compiler
> 	It's a C compiler that's a library.
> 
> [2]	https://github.com/spc476/lua-conmanorg/blob/master/src/tcc.c
> 
> [3]	https://github.com/spc476/lua-conmanorg/blob/master/lua/cc.lua

  -spc