GLib
GLib is a free and open-source utility library written in the C programming language, serving as a low-level core foundation for graphical and non-graphical applications by providing essential data structures, portability abstractions, and utility functions such as string manipulation, file handling, and a main event loop implementation.[1] Developed as part of the GNOME project and closely integrated with the GTK toolkit, GLib enables cross-platform development on Unix-like systems, Windows, and other environments by abstracting operating system-specific details.[2] Licensed under the GNU Lesser General Public License version 2.1 or later, it allows both open-source and proprietary software to link against it without requiring the full source code disclosure of the linking application.[1] Key features of GLib include a variety of dynamic data structures like doubly-linked lists (GList), hash tables (GHashTable), and arrays (GArray), which facilitate efficient memory management and algorithmic operations in C programs.[1] It also incorporates threading support through components such as mutexes (GMutex) and condition variables (GCond), enabling concurrent programming, as well as I/O abstractions via the GIO framework for handling files, sockets, and streams in a platform-independent manner.[1] Additionally, GLib provides Unicode-aware string utilities, date and time handling, and a testing framework to support robust software development.[1] Historically, GLib originated alongside the GTK+ toolkit in the mid-1990s as a response to the need for portable, low-level utilities in the creation of the GNOME desktop environment, with its first stable release in 1998.[3] Over time, it has evolved through numerous versions, introducing significant enhancements like the GObject object system for dynamic typing and introspection (since version 2.0 in 2002) and the GVariant serialization format (in version 2.24 in 2010), making it indispensable for modern GNOME applications and beyond.[1] As of November 2025, the stable release is version 2.87.0.[4] Today, GLib powers a wide array of software, from desktop environments to embedded systems, underscoring its role as a foundational library in open-source C development.[2]Overview
Purpose and Design
GLib serves as a foundational utility library for C programming, comprising three primary low-level system libraries: the GLib core, which offers essential data types, macros, and utilities; GObject, which implements an object-oriented type system; and GIO, which provides abstractions for input/output operations including networking and file handling. These components collectively enable cross-platform development by supplying portable data structures, string and file utilities, and a main event loop abstraction, making GLib suitable for building robust applications without direct dependence on graphical interfaces.[1][5] The design of GLib emphasizes portability across diverse operating systems, including GNU/Linux, Windows, and macOS, by prioritizing POSIX-compliant APIs while incorporating fallbacks for non-standard behaviors to minimize platform-specific code. This approach ensures efficiency and simplicity, particularly for non-graphical applications, through wrappers that abstract operating system differences in areas such as threading, file input/output, and memory management—allowing developers to write code that functions consistently without delving into low-level OS details.[1][6] Originally developed as an integral part of the GTK+ toolkit, GLib was separated into a standalone library with the release of GTK+ 1.2 in February 1999 to facilitate its independent use in broader C-based projects beyond graphical user interfaces.[7] This separation underscored GLib's role as a versatile, reusable foundation for software development in the GNOME ecosystem and elsewhere.[5]Licensing and Platforms
GLib is released under the GNU Lesser General Public License (LGPL) version 2.1 or later, which permits the library to be linked into proprietary software applications without requiring the disclosure of the application's source code, while mandating that any modifications to GLib itself must be made available under the same license. This licensing model facilitates widespread adoption in both open-source and commercial projects by balancing permissive use with copyleft protections for derivative works of the library.[1] Development of GLib is primarily overseen by the GNOME Project, with contributions submitted and reviewed through the project's GitLab repository, enabling collaborative input from a global community of developers.[2] The library is maintained by a core team of contributors, including key figures such as Ryan Lortie, who has played a significant role in ongoing maintenance and portability enhancements, and historical contributors like Havoc Pennington, who influenced early design and implementation decisions.[8] GLib provides full support for a range of operating systems, including Linux distributions, BSD variants such as FreeBSD, Solaris, macOS, and Windows, ensuring portability across Unix-like systems and Microsoft environments through abstractions for file handling, threading, and networking.[1][9] Partial support extends to embedded systems, achievable via cross-compilation tools like Meson, though some advanced features may require platform-specific adaptations. In terms of compiler compatibility, GLib is designed to work with GNU Compiler Collection (GCC), Clang (from LLVM), and Microsoft Visual C++ (MSVC), requiring at minimum C99 standard compliance for core functionality, while recommending C11 for optimal feature support and fallback code handling older toolchains.[10] This broad compatibility is tested on configurations including MinGW for Windows and native builds on Unix platforms, minimizing dependencies on compiler-specific extensions.[11]Components
Core Utilities
GLib's core utilities provide low-level functions for essential programming tasks, offering portable and efficient implementations that abstract platform-specific details. These utilities form the foundation for higher-level components in GLib, enabling developers to handle common operations without relying on system-specific code. They emphasize safety, UTF-8 compatibility, and integration with GLib's ecosystem, such as error propagation and memory management.[1]String Utilities
GLib includes a suite of string utilities designed for safe manipulation of UTF-8 encoded strings, which is crucial for internationalization and cross-platform compatibility. Theg_strdup function allocates and duplicates a string, returning NULL if the input is NULL, ensuring memory-safe copying without manual allocation concerns.[12] Similarly, g_strsplit splits a string into an array of substrings based on a specified delimiter string, handling UTF-8 sequences properly and allowing a maximum number of tokens to prevent excessive fragmentation.
For formatted output, GLib offers variants of the standard C printf family, such as g_printf, g_fprintf, g_sprintf, and their variadic versions like g_vasprintf, which support UTF-8 strings and positional parameters for flexible formatting.[13] These functions require inclusion of <glib/gprintf.h> and use macros like G_GUINT64_FORMAT to handle platform-dependent integer formats, avoiding issues with varying type sizes.[14] Precision specifiers like %Ns count bytes rather than characters, which developers must consider for multi-byte UTF-8 characters to prevent truncation errors.[14]
Internationalization is supported through integration with the gettext library, facilitated by macros in <glib/gi18n.h> for applications or <glib/gi18n-lib.h> for libraries. The _() macro translates strings at runtime via gettext(), while N_() marks strings for extraction by tools like xgettext without immediate translation.[15] Context-aware macros such as C_() and Q_() enhance translation accuracy by providing disambiguating information, with setup involving bindtextdomain() and textdomain() calls to link message catalogs.[15]
File and I/O Utilities
GLib's file utilities abstract POSIX-like operations for portability across Unix-like systems and Windows, handling filename encodings transparently. Theg_file_get_contents function reads an entire file into a newly allocated string, using UTF-8 on Windows or the current locale on POSIX systems, and reports errors via the GError mechanism.[16]
Directory creation is simplified with g_mkdir_with_parents, which recursively creates a directory and any missing parent directories, returning TRUE on success and setting an error otherwise, thus avoiding nested mkdir calls. For opening files, g_open provides a portable interface equivalent to POSIX open(), supporting flags like O_RDONLY and handling Unicode filenames on Windows by converting UTF-8 to wide characters or the system code page. These functions ensure consistent behavior, such as atomic operations where possible, and integrate with GLib's error reporting for robust I/O handling.[17]
Memory Management
Memory allocation in GLib builds on standard C functions but adds safeguards like automatic termination on failure and debugging support. Theg_malloc function allocates the specified number of bytes, returning NULL only if zero bytes are requested, and aborts the program if allocation fails, preventing undefined behavior from unhandled out-of-memory conditions.[18] Companion functions include g_realloc for resizing allocations and g_free for deallocation, maintaining compatibility with standard malloc when possible.[19]
For efficient allocation of small, fixed-size blocks, g_slice_alloc uses a slice allocator optimized for performance and scalability in multi-threaded environments, though since GLib 2.76, it internally relies on g_malloc for implementation.[20] Developers can enable debugging modes via the G_SLICE environment variable; for instance, G_SLICE=always-malloc forces all slice allocations to use the general-purpose allocator, facilitating integration with tools like Valgrind for leak detection.[21] Other options like G_SLICE=debug-blocks add integrity checks to slices, helping identify corruption without altering production behavior.[21]
Threading Primitives
GLib provides basic threading primitives for concurrency without assuming a full threading library, ensuring portability across platforms with varying thread support. Theg_mutex_new function creates a new mutex (GMutex) for synchronizing access to shared resources, which can be locked with g_mutex_lock and unlocked with g_mutex_unlock, supporting recursive variants via GRecMutex.
Thread creation is handled by g_thread_new, which spawns a new thread executing the provided function (replacing the deprecated g_thread_create since GLib 2.32); it returns a GThread pointer for management and initializes threading automatically. These primitives enable basic producer-consumer patterns using condition variables (GCond) but require manual synchronization, as GLib data structures are not inherently thread-safe.[22] Since GLib 2.32, no explicit initialization like g_thread_init is needed, simplifying usage in modern applications.[22]
Error Handling
Error handling in GLib uses theGError structure to propagate recoverable errors in a structured, domain-specific manner, avoiding global variables like errno. The GError is a simple struct containing a domain (a quark identifying the error source, e.g., G_FILE_ERROR), a numeric code from an enumeration (e.g., G_FILE_ERROR_NOENT for "no such file"), and a human-readable UTF-8 message.[23]
Functions report errors by passing a GError ** pointer; if non-NULL, they set the error with g_set_error, which allocates and populates the structure, while callers can propagate it further with g_propagate_error or clear it with g_clear_error.[24] Domains are defined per module, such as g_file_error_quark for file operations, allowing specific error codes without conflicts.[24] This system supports ignoring errors by passing NULL and checking with g_error_matches for conditional handling, promoting clean, chainable error flows in code.[24]
Data Structures
GLib offers a suite of generic data structures designed to facilitate efficient collection management in C applications, including lists, hash tables, trees, arrays, and queues. These structures are implemented as opaque types, allowing users to interact via provided functions without direct access to internal representations, which promotes portability and abstraction. They support common operations such as insertion, removal, traversal, and cleanup, often with customizable comparison and hash functions to handle user-defined data types.Linked Lists
GLib includes two types of linked lists: GList for doubly-linked lists and GSList for singly-linked lists, both suitable for dynamic sequences where frequent insertions and deletions occur at arbitrary positions. The GList structure enables bidirectional traversal and operations like appending elements withg_list_append() or prepending with g_list_prepend(), while removal uses g_list_remove() and full cleanup is handled by g_list_free(). In contrast, GSList supports only forward traversal, with analogous functions such as g_slist_append(), g_slist_prepend(), g_slist_remove(), and g_slist_free(), making it lighter in memory usage for one-way lists. These lists are particularly useful for maintaining ordered collections without resizing overhead, as each node stores a data pointer and links to neighbors.[25][26]
Hash Tables
The GHashTable provides an associative array for storing key-value pairs, using a hash function and equality comparison to enable average O(1) lookup, insertion, and removal times. It is created withg_hash_table_new(), specifying hash and key comparison functions, and supports operations like g_hash_table_insert() for adding or replacing entries, g_hash_table_lookup() for retrieval, and g_hash_table_remove() for deletion, with destruction via g_hash_table_destroy(). GLib supplies default hash functions for common types like strings (g_str_hash()) and pointers, but users can provide custom ones for arbitrary keys, ensuring collision resolution through chaining. This structure is ideal for scenarios requiring fast, unordered access to mappings, such as caching or configuration storage.[27]
Trees and Nodes
GLib's GTree implements a self-balancing binary search tree, maintaining sorted order based on a user-supplied comparison function for efficient searching, insertion, and deletion in O(log n) time. Initialization occurs withg_tree_new(), followed by insertions via g_tree_insert() and lookups with g_tree_lookup(), while traversal functions support in-order (g_tree_foreach() with ascending order), pre-order, or post-order iterations. Removal uses g_tree_remove(), and cleanup is managed by g_tree_destroy(). Although GLib does not provide a dedicated ordered set type like a "GTreeSet," GTree can emulate one by using keys as elements and ignoring values, offering ordered uniqueness through its balancing mechanism. These trees are valuable for applications needing sorted data with logarithmic operations, such as priority queues or range queries.[28]
Arrays and Queues
For contiguous storage, GArray serves as a resizable array of arbitrary element types, growing or shrinking dynamically to accommodate additions and removals without manual memory management. It is initialized withg_array_new(), elements are appended using g_array_append_val() or inserted with g_array_insert_val(), and the array is freed via g_array_free(), with optional zeroing on removal for security. Complementing this, GQueue implements a double-ended queue for FIFO (first-in, first-out) or LIFO operations, built on a GList internally for efficient pushes and pops at both ends. Creation uses g_queue_new(), with tail pushes via g_queue_push_tail() and head pops with g_queue_pop_head(), alongside g_queue_free() for cleanup. These structures are optimized for sequential access patterns, with GArray favoring random access and GQueue excelling in dequeuing workflows like task scheduling.[29][30]
Algorithms
GLib supplies utility algorithms for common data manipulations, including sorting and memory allocation pools integrated with its structures. For sorting, the functiong_qsort_with_data() provides a stable quicksort variant that accepts a comparison function and user data, applicable to arrays or lists, though it has been deprecated since version 2.82 in favor of g_sort_array() for type-safe sorting of GArray instances. Tree-specific searches leverage GTree's built-in lookup, while general searching can use iteration macros like g_list_foreach(). Regarding memory management, the deprecated GMemChunk offered fixed-size block pools for repeated allocations, created with g_mem_chunk_new() and freed via g_mem_chunk_free(), but since GLib 2.10, it is recommended to use memory slices with functions like g_slice_alloc() and g_slice_free1() for similar efficiency without fragmentation risks. These algorithms enhance the usability of GLib's containers by providing thread-safe, performant primitives for data processing.[31][21]
Object and Event Systems
GLib provides higher-level abstractions for object-oriented programming and event handling through the GObject system and the GIO framework, enabling developers to build extensible, type-safe applications. The GObject system forms the foundation, offering a dynamic type system and mechanisms for signals and properties that support inheritance and polymorphism in C. This is complemented by GIO, which abstracts input/output operations across various backends, and an event loop infrastructure for managing asynchronous events. The GObject type system revolves around GType, a fundamental identifier that uniquely represents registered types in the hierarchy, allowing for runtime type checking and introspection. Instances of GObject-derived classes are created usingg_object_new(), which constructs objects with specified properties and initializes them according to their class definitions. Event handling is facilitated through signals, where developers connect callback functions to specific signals on an object using g_signal_connect(), and events are emitted via g_signal_emit() to notify connected handlers, mimicking a publish-subscribe pattern.[32]
Object properties are defined using GParamSpec, which encapsulates metadata such as type, default value, and constraints for parameters, enabling automatic handling of getters, setters, and notifications. For multiple inheritance-like behavior, GLib supports interfaces via GInterface, where classes can implement one or more interfaces by providing the required virtual functions, promoting code reuse without deep inheritance hierarchies. These features allow GObject to serve as a lightweight, C-based alternative to full object-oriented languages while integrating seamlessly with GLib's core utilities for error propagation in object methods.
The GIO framework extends these concepts to I/O operations, providing GFile as an abstract interface for file and directory manipulation that works uniformly across local filesystems, networks, and archives without exposing backend details. GVfs manages virtual filesystems, enabling mounting of remote resources—such as network shares via tools like gvfs-mount—and integrating with GFile for transparent access to URIs like smb:// or ftp://. This abstraction layer simplifies cross-platform file handling and supports extensibility through plugins.[33][34]
For event-driven programming, GLib includes GMainContext, which manages a set of event sources and polls for readiness, and GMainLoop, which runs the context to process and dispatch events in a single thread. Custom events are added via GSource, allowing developers to integrate timeouts, file descriptors, or other I/O sources into the loop with configurable priorities. This infrastructure powers asynchronous applications by avoiding blocking operations.[35][36][37]
Asynchronous I/O is supported through GTask, a utility for wrapping synchronous functions into cancellable async operations that report progress and results via callbacks, and GCancellable, which provides a token to abort ongoing tasks cooperatively. These integrate with D-Bus via GDBus, enabling asynchronous method calls, signal emissions, and proxy generation for inter-process communication, ensuring cancellable and thread-safe operations across applications.[38][39]
Tools and Programs
Command-Line Utilities
GLib provides several command-line utilities that enable developers and users to interact with its APIs directly from the shell, particularly for I/O operations, D-Bus communication, application launching, and settings management. These tools leverage the underlying GIO framework for high-level file and network handling, as well as GObject-based systems for object introspection and events.[40] Thegio utility serves as the primary command-line interface for GIO operations, allowing manipulation of files, mounts, and queries across local and remote locations using URIs such as file:// or smb://. It supports file copying with the copy subcommand, which preserves attributes when the --preserve option is used; for example, gio copy --preserve file1.txt /destination/ transfers the file while maintaining metadata. Mounting is handled via the mount subcommand, enabling attachment of removable media or network shares, such as gio mount smb://server/share to access a remote SMB resource. Querying file information uses info, which displays attributes like size and type; an example is gio info file.txt to retrieve details on a local file. Additionally, gio integrates with desktop environments through the trash subcommand, moving files to the Trash folder for reversible deletion, as in gio trash document.pdf, or emptying the Trash with gio trash --empty.[41]
For D-Bus interactions, the gdbus tool facilitates introspection, method invocation, and signal emission on bus objects, providing a simple way to probe and control services without writing code. The introspect subcommand outputs XML descriptions of interfaces and properties for a given object path, supporting recursion with --recurse; for instance, gdbus introspect --system --dest org.freedesktop.[NetworkManager](/page/NetworkManager) --object-path /org/freedesktop/NetworkManager/Devices/0 generates an XML tree of the NetworkManager device's interfaces. Method calls are executed using call, specifying the destination, object path, and method name, with optional timeout; an example is gdbus call --session --dest org.freedesktop.Notifications --object-path /org/freedesktop/Notifications --method org.freedesktop.Notifications.Notify "app" 0 "" "Title" "Body" [] {} to send a desktop notification. Signal emission employs emit to broadcast events, such as gdbus emit --session --object-path /foo --signal org.bar.Foo "['data']" to trigger a custom signal on the session bus.[42]
The gapplication utility manages D-Bus-activated applications, allowing launches and action invocations from the command line in compliance with the freedesktop.org Application interface. It launches applications by ID with the launch subcommand, optionally passing files or URIs; for example, gapplication launch org.gnome.TextEditor document.txt opens the specified file in the GNOME Text Editor. Action handling uses action to execute named operations, supporting GVariant parameters; a sample invocation is gapplication action org.example.App quit to terminate a running instance gracefully. The tool also lists available applications with list-apps, scanning .desktop files for D-Bus support.[43]
Settings management is handled by gsettings, which provides schema-based access to key-value pairs stored in backends like dconf, enabling get and set operations for application and system configurations. Retrieval uses get with a schema and key, such as gsettings get org.[gnome](/page/GNOME).desktop.interface font-name to fetch the current interface font. Modification employs set, serializing values as GVariants; for instance, gsettings set org.[gnome](/page/GNOME).desktop.interface gtk-theme '[Adwaita](/page/Adwaita)' applies the Adwaita theme. Monitoring changes is possible via monitor, watching a key or entire schema for real-time updates.[44]
Resource Management Tools
GLib provides several command-line tools for managing application resources and schemas during the build and installation process, enabling developers to embed files and compile configurations efficiently into binaries. Theglib-compile-resources tool compiles XML resource descriptions into binary bundles or C source files suitable for embedding in applications using the GResource API. It processes files with a .gresource.xml extension, which specify resources such as icons, UI definitions, and data files via a hierarchical structure with prefixes like /org/example/app. For instance, running glib-compile-resources resources.xml --target=app.gresource generates a .gresource file that can be linked into the binary, supporting options for compression and preprocessing (e.g., stripping blanks from XML). This tool includes validation by checking the existence of referenced file paths relative to the --sourcedir option, reporting errors if paths are invalid or files are missing.[45]
Complementing compilation, the gresource tool manages embedded resources at runtime or during development by inspecting and extracting from compiled .gresource files or ELF binaries containing them. Its subcommands include list to enumerate resources (e.g., gresource list app.gresource), details for metadata like size and compression status, extract to output specific files (e.g., gresource extract app.gresource /org/example/icon.[png](/page/PNG)), and sections to identify resource sections in executables. This facilitates debugging and resource verification without runtime dependencies.[46]
For schema management, glib-compile-schemas converts GSettings XML schema files (.gschema.xml) in a directory—typically /usr/share/glib-2.0/schemas—into an efficient binary gschemas.compiled file used by the GSettings system for key-value storage. Invoked as glib-compile-schemas /usr/share/glib-2.0/schemas, it performs validation on schema keys, aborting on errors in strict mode (--strict) and supporting dry runs (--dry-run) to check integrity without output. This compilation reduces lookup overhead and ensures schema consistency, integrating briefly with GSettings for application configuration.
These tools integrate seamlessly with modern build systems to enable static resource inclusion, minimizing runtime file dependencies. In Meson, the gnome.compile_resources function automates glib-compile-resources invocation, as in gnome.compile_resources('app-resources', 'data/app.gresource.xml', source_dir: 'data'), generating dependencies for Ninja. Similar support exists in Autotools via custom rules tracking dependencies with --generate-dependencies, and in CMake through add_custom_command to invoke the compiler, promoting portable and self-contained builds across platforms.[47][45]
History
Origins and Development
GLib originated in 1998 as a set of utility functions developed by the GTK+ team, including Peter Mattis, Spencer Kimball, and Josh MacDonald, who extracted these components from the initial GTK 1.0 codebase to facilitate reuse in projects beyond graphical user interfaces.[48][49] This extraction addressed the need for a foundational library offering data structures, macros, and portability wrappers absent from the standard C library, enabling more efficient development of cross-platform applications.[48] In preparation for GTK 2.0, released in March 2002, GLib's codebase underwent significant refactoring to become a fully independent library, decoupling it from GTK-specific dependencies and supporting non-graphical software.[50][48] This separation, initiated with GLib 1.1.0 in July 1998[51] and solidified by version 1.2 in early 1999, enhanced modularity and binary compatibility through shared library versioning.[48] Upon its integration into the GNOME desktop environment around 1999–2000, GLib became a cornerstone of the platform, with pivotal contributions from developers like Tim Janik, a key developer of the GObject type system introduced in GLib 2.0 (2002), and Sebastian Wilhelmi, who advanced features such as atomic operations and configuration tools.[48] The library's evolution was propelled by requirements for overcoming C standard limitations, including portable Unicode support added in early releases and threading abstractions via GThread in version 1.1.8.[48] GLib's ongoing maintenance occurs within the open-source GNOME community, with its repository hosted on GitLab since 2018 following the project's migration from earlier Git hosting.[52] Development relies on Bugzilla for bug tracking and resolution, supplemented by annual hackfests where contributors collaborate on planning and implementation.[53] These processes ensure sustained portability and feature enhancements, such as improved main loop abstractions in version 1.1.6.[48]Release Timeline
GLib's development began with its initial release in early 1998 as version 1.0, providing foundational utilities including data structures like GList and GHashTable, memory management, string handling, and file operations, extracted from the GTK+ toolkit to enable broader reuse.[54] Subsequent early versions expanded portability and functionality; for instance, version 1.2.0 in February 1999 introduced Win32 support, basic threading primitives, dynamic module loading via GModule, and inter-process communication through GIOChannel.[48] By version 1.3.6 in late 1999, threading support was further stabilized with improved mutexes and condition variables, preparing the library for multi-threaded applications.[48] The transition to the 2.x series marked a major milestone with version 2.0 released on March 8, 2002, establishing a stable API/ABI for long-term compatibility, integrating the GObject object system, enhancing Unicode support, and adding full thread safety across core components like GString and GSpawn.[55] During the GTK+ 2 era, releases like 2.14 in September 2007 refined command-line parsing with GOption (introduced in 2.8) and introduced configuration handling via GKeyFile, while introducing initial serialization concepts that evolved into GVariant.[48][56] Version 2.26, released in September 2010, added GSettings for schema-based configuration management, simplifying application preferences over traditional INI files.[48][57] Modern enhancements continued with version 2.24 in March 2010 fully implementing GVariant for type-safe serialization of structured data, crucial for D-Bus integration and IPC.[48][58] Version 2.38, released on September 23, 2013, introduced D-Bus activation support for services, along with GNotification and GSubprocess for process management.[48] Deprecations began addressing legacy code; notably, GMemChunk for memory pooling was removed in version 2.56 (March 12, 2018), with developers encouraged to shift to GBytes for efficient binary data handling and the slice allocator for small allocations.[48] Recent versions have focused on performance, portability, and modernity. Version 2.72, released on March 17, 2022, included async operation improvements such as better thread pool management in GTask and EPOLL_CLOEXEC support for efficient I/O.[59] Version 2.80, released on March 7, 2024, enhanced Windows compatibility with improved symlink handling, registry access, and iconv defaults for macOS cross-compilation.[60] As of November 2025, the latest stable release is 2.86.1 on October 21, 2025, a patch release following 2.86.0 on September 5, 2025, which reworked GIO platform-specific API imports for better introspection and cross-platform compatibility; an unstable 2.87.0 followed on November 3, 2025, updating to Unicode 17.0.0 and adding runtime extensions to gdbus-codegen.[4]| Version | Release Date | Key Features and Changes |
|---|---|---|
| 1.0 | Early 1998 | Basic utilities, data structures, memory and string handling.[54] |
| 1.2.0 | February 1999 | Win32 portability, initial threading, GModule, GIOChannel.[48] |
| 2.0 | March 8, 2002 | Stable API, GObject system, full threading, Unicode enhancements.[55] |
| 2.10 | February 2006 | Threading refinements, portability improvements.[61] |
| 2.24 | March 2010 | GVariant for serialization.[48][58] |
| 2.26 | September 2010 | GSettings for configurations.[48][57] |
| 2.38 | September 23, 2013 | D-Bus activation, GNotification, GSubprocess.[48] |
| 2.56 | March 12, 2018 | GMemChunk removal, GBytes adoption.[48] |
| 2.72 | March 17, 2022 | Async improvements, GTask enhancements.[59] |
| 2.80 | March 7, 2024 | Windows support improvements.[60] |
| 2.86.0 | September 5, 2025 | GIO introspection rework.[4] |
| 2.86.1 | October 21, 2025 | Stable patches.[4] |