I'm not sure if you can do something like that in C. In C, aren't data structures like structs defined at compile time? You could make a data structure and then populate it based on a Lua method or something but it feels like it'd be better to do it from C instead if it's just going to stay in C (alternatively, if it's needed in Lua, provide a method to push a table populated with the config to Lua).On Fri, Oct 27, 2017 at 3:02 AM Miha Cooper <email@example.com> wrote:What about C/C++ bindings over Lua API like Sol2 or LuaBridge? Is it necessary to generate structures to parse configs?On 27 October 2017 at 09:59, Russell Haley <firstname.lastname@example.org> wrote:Hi,
I was hoping someone had already written something that can use Lua
tables as templates for generating C structures? The idea was to
generate the structures to be used to read config files in C.
Yes, very light on requirements.
--With best regards,