Yesterday I’ve released lgob 13.09, which fixes issues with newer GCC versions on x64 systems.
lgob is a compiler that automatically generates C code to bind GObject-based libraries, like GTK+ and WebKitGTK+, to Lua. It works by parsing GObject-Introspection .gir files and emitting C code. Any library that supports GObjectIntrospection can be made available for Lua by using lgob.
lgob already ships with ready to use modules for popular libraries like GTK+, GDK, gstreamer, pango, cairo (besides not being GObject-based), WebKitGTK+, poppler, vte, GtkSourceView, and others.
lgob depends on Lua 5.1 / luajit (but should be easy to port to Lua 5.2), and the libraries that one wish to use (GTK+, vte, etc).
To build and install all available modules to /usr/local, run (inside of the extracted lgob package):
$ lua5.1 build_all.lua /usr/local
There are more than 50 examples in lgob package. lgob-generated bindings uses the same API as the original library, e.g., you can use the original API reference to program in Lua with lgob.
Some code samples are listed below.
Note: lgob is know to work on MS-Windows too, but there are no official builds. Last time I’ve cross-compiled it with MinGW by using the windows GTK+ build from OpenSuse build service.