+0
Daily
+0
Weekly
+6
Monthly
5,129
stars
750
forks
200
watchers
95
prs
211
issues
27
releases
README
A glib-like cross-platform C library Supporting the project Support this project by becoming a sponsor. Your logo will show up here with a link to your website. 🙏 [Become a sponsor] Introduction (中文) TBOX is a glib-like cross-platform C library that is simple to use yet powerful in nature. The project focuses on making C development easier and provides many modules (.e.g stream, coroutine, regex, container, algorithm ...), so that any developer can quickly pick it up and enjoy the productivity boost when developing in C language. It supports the following platforms: Windows, Macosx, Linux, Android, iOS, BSD and etc. And it provides many compiling options using xmake: Release: Disable debug information, assertion, memory checking and enable optimization. Debug: Enable debug information, assertion, memory checking and disable optimization. Small: Disable all extensional modules and enable space optimization. Micro: compiling micro library (~64K) for the embed system. If you want to know more, please refer to: Documents, Github and Gitee Features The stream library - Supports file, data, http and socket source - Supports the stream filter for gzip, charset and... - Implements stream transfer - Implements the static buffer stream for parsing data - Supports coroutine and implements asynchronous operation The coroutine library - Provides high-performance coroutine switch - Supports arm, arm64, x86, x86_64 .. - Provides channel interfaces - Provides semaphore and lock interfaces - Supports io socket and stream operation in coroutine - Provides some io servers (http ..) using coroutine - Provides stackfull and stackless coroutines - Support epoll, kqueue, poll, select and IOCP - Support to wait pipe, socket and process in coroutine and poller at same time The database library - Supports mysql and sqlite3 database and enumerates data using the iterator mode The xml parser library - Supports DOM and SAX mode and Supports xpath The serialization and deserialization library - Supports xml, json, bplist, xplist, binary formats The memory library - Implements some memory pools for optimizing memory - Supports fast memory error detecting. it can detect the following types of bugs for the debug mode: - out-of-bounds accesses to heap and globals - use-after-free - double-free, invalid free - memory leaks The container library - Implements hash table, single list, double list, vector, stack, queue and min/max heap. Supports iterator mode for algorithm The algorithm library - Uses the iterator mode - Implements find, binary find and reverse find algorithm - Implements sort, bubble sort, quick sort, heap sort and insert sort algorithm - Implements count, walk items, reverse walk items, for_all and rfor_all The network library - Implements dns(cached) - Implements ssl(openssl, polarssl, mbedtls) - Implements http - Implements cookies - Supports ipv4, ipv6 - Supports coroutine The platform library - Implemen