tboox/tbox
Free🎁 A glib-like multi-platform c library
About tboox/tbox
TBOX is a glib-like cross-platform C library designed to simplify C development and boost productivity. It offers a wide range of modules including stream I/O, coroutines, regular expressions, containers, algorithms, XML parsing, serialization/deserialization, network communication, and memory management. The library supports Windows, macOS, Linux, Android, iOS, and *BSD, and provides multiple build configurations (Release, Debug, Small, Micro) via the xmake build system. It includes advanced features such as coroutine-based asynchronous I/O, high-performance memory pools with debugging for common bugs (out-of-bounds, use-after-free, leaks), and support for SSL/TLS, DNS caching, and HTTP. TBOX is suitable for both desktop and embedded systems, with a micro build targeting around 64KB.
Key Features
Pros & Cons
- Comprehensive set of modules covering I/O, networking, data structures, and algorithms
- Cross-platform with consistent API across Windows, Linux, macOS, mobile, and BSD
- Coroutine support for efficient asynchronous programming without callback complexity
- Memory debugging features help detect common C bugs in debug builds
- Multiple build configurations allowing size optimization down to ~64KB for embedded use
- Active open-source community with over 5,000 stars and frequent commits
- Detailed documentation available (documents link referenced)
- Requires xmake build system (not a standard build tool like CMake or Make)
- Primarily a general-purpose C library; not specialized for AI or machine learning tasks
- Steep learning curve for developers unfamiliar with glib-style abstractions
- Some modules (e.g., database, SSL) have external dependencies
- Limited to C programming language; no native support for C++ or other languages