[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-6558":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":35,"readmeContent":36,"aiSummary":37,"trendingCount":16,"starSnapshotCount":16,"syncStatus":38,"lastSyncTime":39,"discoverSource":40},6558,"tbox","tboox\u002Ftbox","tboox","🎁 A glib-like multi-platform c library","https:\u002F\u002Ftboox.top",null,"C",5112,754,201,37,0,4,65.03,"Apache License 2.0",false,"dev",true,[24,25,26,27,28,29,30,31,32,5,33,34],"algorithm","container","coroutines","cross-platform","iterator","json","network","plist","stream","xmake","xml","2026-06-12 04:00:29","\u003Cdiv align=\"center\">\n\n  \u003Ca href=\"https:\u002F\u002Fdocs.tboox.top\">\n    \u003Cimg width=\"160\" heigth=\"160\" src=\"https:\u002F\u002Fdocs.tboox.top\u002Fassets\u002Fimg\u002Flogo_text.png\">\n  \u003C\u002Fa>\n\n  \u003Cdiv>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ftboox\u002Ftbox\u002Factions?query=workflow%3AWindows\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Ftboox\u002Ftbox\u002Fwindows.yml?branch=dev&style=flat-square&logo=windows\" alt=\"github-ci\" \u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ftboox\u002Ftbox\u002Factions?query=workflow%3ALinux\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Ftboox\u002Ftbox\u002Flinux.yml?branch=dev&style=flat-square&logo=linux\" alt=\"github-ci\" \u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ftboox\u002Ftbox\u002Factions?query=workflow%3AmacOS\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Ftboox\u002Ftbox\u002Fmacos.yml?branch=dev&style=flat-square&logo=apple\" alt=\"github-ci\" \u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ftboox\u002Ftbox\u002Factions?query=workflow%3AAndroid\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Ftboox\u002Ftbox\u002Fandroid.yml?branch=dev&style=flat-square&logo=android\" alt=\"github-ci\" \u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ftboox\u002Ftbox\u002Freleases\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Frelease\u002Ftboox\u002Ftbox.svg?style=flat-square\" alt=\"Github All Releases\" \u002F>\n    \u003C\u002Fa>\n  \u003C\u002Fdiv>\n  \u003Cdiv>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ftboox\u002Ftbox\u002Fblob\u002Fmaster\u002FLICENSE.md\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Ftboox\u002Ftbox.svg?colorB=f48041&style=flat-square\" alt=\"license\" \u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fwww.reddit.com\u002Fr\u002Ftboox\u002F\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fchat-on%20reddit-ff3f34.svg?style=flat-square\" alt=\"Reddit\" \u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgitter.im\u002Ftboox\u002Ftboox?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgitter\u002Froom\u002Ftboox\u002Ftboox.svg?style=flat-square&colorB=96c312\" alt=\"Gitter\" \u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Ft.me\u002Ftbooxorg\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fchat-on%20telegram-blue.svg?style=flat-square\" alt=\"Telegram\" \u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fjq.qq.com\u002F?_wv=1027&k=5hpwWFv\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fchat-on%20QQ-ff69b4.svg?style=flat-square\" alt=\"QQ\" \u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Ftboox.top\u002Fdonation\u002F\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdonate-us-orange.svg?style=flat-square\" alt=\"Donate\" \u002F>\n    \u003C\u002Fa>\n  \u003C\u002Fdiv>\n\n  \u003Cp>A glib-like cross-platform C library\u003C\u002Fp>\n\u003C\u002Fdiv>\n\n## Supporting the project\n\nSupport this project by becoming a sponsor. Your logo will show up here with a link to your website. 🙏 [[Become a sponsor](https:\u002F\u002Fdocs.tboox.top\u002F#\u002Fabout\u002Fsponsor)]\n\n\u003Ca href=\"https:\u002F\u002Fopencollective.com\u002Ftbox#backers\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fopencollective.com\u002Ftbox\u002Fbackers.svg?width=890\">\u003C\u002Fa>\n\n## Introduction ([中文](\u002FREADME_zh.md))\n\nTBOX is a glib-like cross-platform C library that is simple to use yet powerful in nature.\n\nThe project focuses on making C development easier and provides many modules (.e.g stream, coroutine, regex, container, algorithm ...),\nso that any developer can quickly pick it up and enjoy the productivity boost when developing in C language.\n\nIt supports the following platforms: Windows, Macosx, Linux, Android, iOS, *BSD and etc.\n\nAnd it provides many compiling options using [xmake](https:\u002F\u002Fgithub.com\u002Fxmake-io\u002Fxmake):\n\n* Release: Disable debug information, assertion, memory checking and enable optimization.\n* Debug: Enable debug information, assertion, memory checking and disable optimization.\n* Small: Disable all extensional modules and enable space optimization.\n* Micro: compiling micro library (~64K) for the embed system.\n\nIf you want to know more, please refer to: [Documents](https:\u002F\u002Fdocs.tboox.top\u002F#\u002Fgetting_started), [Github](https:\u002F\u002Fgithub.com\u002Ftboox\u002Ftbox) and [Gitee](https:\u002F\u002Fgitee.com\u002Ftboox\u002Ftbox)\n\n## Features\n\n#### The stream library\n\n- Supports file, data, http and socket source\n- Supports the stream filter for gzip, charset and...\n- Implements stream transfer\n- Implements the static buffer stream for parsing data\n- Supports coroutine and implements asynchronous operation\n\n#### The coroutine library\n\n- Provides high-performance coroutine switch\n- Supports arm, arm64, x86, x86_64 ..\n- Provides channel interfaces\n- Provides semaphore and lock interfaces\n- Supports io socket and stream operation in coroutine\n- Provides some io servers (http ..) using coroutine\n- Provides stackfull and stackless coroutines\n- Support epoll, kqueue, poll, select and IOCP\n- Support to wait pipe, socket and process in coroutine and poller at same time\n\n#### The database library\n\n- Supports mysql and sqlite3 database and enumerates data using the iterator mode\n\n#### The xml parser library\n\n- Supports DOM and SAX mode and Supports xpath\n\n#### The serialization and deserialization library\n\n- Supports xml, json, bplist, xplist, binary formats\n\n#### The memory library\n\n- Implements some memory pools for optimizing memory\n- Supports fast memory error detecting. it can detect the following types of bugs for the debug mode:\n  - out-of-bounds accesses to heap and globals\n  - use-after-free\n  - double-free, invalid free\n  - memory leaks\n\n#### The container library\n\n- Implements hash table, single list, double list, vector, stack, queue\n  and min\u002Fmax heap. Supports iterator mode for algorithm\n\n#### The algorithm library\n\n- Uses the iterator mode\n- Implements find, binary find and reverse find algorithm\n- Implements sort, bubble sort, quick sort, heap sort and insert sort algorithm\n- Implements count, walk items, reverse walk items, for_all and rfor_all\n\n#### The network library\n\n- Implements dns(cached)\n- Implements ssl(openssl, polarssl, mbedtls)\n- Implements http\n- Implements cookies\n- Supports ipv4, ipv6\n- Supports coroutine\n\n#### The platform library\n\n- Implements timer, fast and low precision timer\n- Implements atomic and atomic64 operation\n- Implements spinlock, mutex, event, semaphore, thread and thread pool\n- Implements file, socket operation\n- Implements poller using epoll, poll, select, kqueue ...\n- Implements switch context interfaces for coroutine\n\n#### The charset library\n\n- Supports utf8, utf16, gbk, gb2312, uc2 and uc4\n- Supports big endian and little endian mode\n\n#### The zip library\n\n- Supports gzip, zlibraw, zlib formats using the zlib library if exists\n- Implements lzsw, lz77 and rlc algorithm\n\n#### The utils library\n\n- Implements base32, base64 encoder and decoder\n- Implements assert and trace output for the debug mode\n- Implements bits operation for parsing u8, u16, u32, u64 data\n\n#### The math library\n\n- Implements random generator\n- Implements fast fixed-point calculation, Supports 6-bits, 16-bits, 30-bits fixed-point number\n\n#### The libc library\n\n- Implements lightweight libc library interfaces, the interface name contains `tb_xxx` prefix for avoiding conflict\n- Implements strixxx strrxxx wcsixxx wcsrxxx interface extension\n- Optimizes some frequently-used interface, .e.g. memset, memcpy, strcpy ...\n- Implements `memset_u16`, `memset_u32`, `memset_u64` extension interfaces\n\n#### The libm library\n\n- Implements lightweight libm library interfaces, the interface name contains `tb_xxx` prefix for avoiding conflict\n- Supports float and double type\n\n#### The regex library\n\n- Supports match and replace\n- Supports global\u002Fmultiline\u002Fcaseless mode\n- Uses pcre, pcre2 and posix regex modules\n\n#### The hash library\n\n- Implements crc32, adler32, md5 and sha1 hash algorithm\n- Implements some string hash algorithms (.e.g bkdr, fnv32, fnv64, sdbm, djb2, rshash, aphash ...)\n- Implements uuid generator\n\n## Projects\n\nSome projects using tbox:\n\n* [gbox](https:\u002F\u002Fgithub.com\u002Ftboox\u002Fgbox)\n* [vm86](https:\u002F\u002Fgithub.com\u002Ftboox\u002Fvm86)\n* [xmake](http:\u002F\u002Fwww.xmake.io)\n* [itrace](https:\u002F\u002Fgithub.com\u002Ftboox\u002Fitrace)\n* [more](https:\u002F\u002Fgithub.com\u002Ftboox\u002Ftbox\u002Fwiki\u002Ftbox-projects)\n\n## Build (xmake)\n\nPlease install xmake first: [xmake](https:\u002F\u002Fgithub.com\u002Fxmake-io\u002Fxmake)\n\n```console\n# build for the host platform\n$ cd .\u002Ftbox\n$ xmake\n\n# build for the mingw platform\n$ cd .\u002Ftbox\n$ xmake f -p mingw --sdk=\u002Fhome\u002Fmingwsdk\n$ xmake\n\n# build for the iphoneos platform\n$ cd .\u002Ftbox\n$ xmake f -p iphoneos\n$ xmake\n\n# build for the android platform\n$ cd .\u002Ftbox\n$ xmake f -p android --ndk=xxxxx\n$ xmake\n\n# build for the linux cross-platform\n$ cd .\u002Ftbox\n$ xmake f -p linux --sdk=\u002Fhome\u002Fsdk # --bin=\u002Fhome\u002Fsdk\u002Fbin\n$ xmake\n```\n\n## Build (xmake.sh)\n\n```console\n$ .\u002Fconfigure\n$ make\n```\n\n## Example\n\n```c\n#include \"tbox\u002Ftbox.h\"\n\nint main(int argc, char** argv) {\n    if (!tb_init(tb_null, tb_null)) return 0;\n\n    tb_vector_ref_t vector = tb_vector_init(0, tb_element_str(tb_true));\n    if (vector) {\n        tb_vector_insert_tail(vector, \"hello\");\n        tb_vector_insert_tail(vector, \"tbox\");\n\n        tb_for_all (tb_char_t const*, cstr, vector) {\n            tb_trace_i(\"%s\", cstr);\n        }\n        tb_vector_exit(vector);\n    }\n    tb_exit();\n    return 0;\n}\n```\n\n## Technical Support\n\nYou can also consider sponsoring us to get technical support services, [[Become a sponsor](https:\u002F\u002Fdocs.tboox.top\u002F#\u002Fabout\u002Fsponsor)]\n\n## Contacts\n\n* Email：[waruqi@gmail.com](mailto:waruqi@gmail.com)\n* Homepage：[tboox.top](https:\u002F\u002Ftboox.top)\n* Community：[\u002Fr\u002Ftboox on reddit](https:\u002F\u002Fwww.reddit.com\u002Fr\u002Ftboox\u002F)\n* ChatRoom：[Chat on telegram](https:\u002F\u002Ft.me\u002Ftbooxorg), [Chat on gitter](https:\u002F\u002Fgitter.im\u002Ftboox\u002Ftboox?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n* QQ Group: 343118190(full), 662147501\n* Wechat Public: tboox-os\n\n","TBOX 是一个类似 glib 的跨平台 C 语言库，旨在简化 C 语言开发。它提供了丰富的功能模块，包括算法、容器、协程、迭代器、JSON 处理、网络编程、属性列表、流处理以及 XML 解析等。该库支持 Windows、Linux、macOS 和 Android 等多个操作系统，具有良好的可移植性和扩展性。适用于需要在多种平台上进行高效 C 语言开发的场景，如系统工具、嵌入式应用或跨平台软件项目。",2,"2026-06-11 03:07:38","top_language"]