“…why should we not calmly and patiently review our own thoughts, and thoroughly examine and see what these appearances in us really are?” — Plato
GObject Introspection is a pretty neat tool from the Gnome project that allows you to expose a common API from a C library to various scripting languages. This is accomplished by “introspection” (my favorite computer metaphor I’ve come across so far) where by a coder may follow conventions that enable the program to take an inventory of its internal state after compiling and describe itself in a structured, language-agnostic kind of way.
The downside of this approach is the complexity it imposes on the library’s initial creators. The most challenging aspect for me was actually getting the thing to build. The best supported build system is the venerable autotools aka the GNU build system, with autoconf, automake, libtool, et al.
This guide is meant to be a gentle introduction to setting up a build system for a GI library. You should have a basic understanding of the GObject class before you begin. All the files discussed here are available on the Github project page.