In computing, GLib refers to a cross-platform software utility library. It started life as part of the GTK+ project, however, before releasing version 2 of GTK+, the project's developers decided to separate non-GUI-specific code from the GTK+ platform, thus creating GLib as a separate product. GLib was released as a separate library so other developers, those that did not make use of the GUI-related portions of GTK+, could make use of the non-GUI portions of the library without the overhead of depending on a full-blown GUI library.
Since GLib is a cross-platform library, applications using it to interface with the operating system are usually portable across different operating systems without major changes.
Some features of GLib include:
A number of data structures (and their related operations) are also defined, including:
GLib, together with GTK+, can be considered similar in scope and purpose to the Windows API. However, applications using the Windows API are not portable to other operating systems, unless the calls are replaced with their equivalents in the target system.
Other widget toolkits usually also provide low-level functions and implementations of data structures. For instance, in the wxWidgets library the non-GUI functions are in the wxBase library, and in Qt the non-GUI parts are in the QtCore module.