Collection of miscellaneous single-header libraries.
| Library | Description |
|---|---|
| autolist.h | A list of items collected from all compilation units |
| xincbin.h | A cross-platform way to include binary data in your executable |
| bresmon.h | File watcher |
| mem_layout.h | Combine multiple mallocs of a nested struct into one |
| barena.h | Arena allocator |
| tlsf.h | Adaptation of jserv/tlsf-bsd |
| bhash.h | Hashtable |
| barray.h | Dynamic array |
| bcoro.h | Coroutine |
| bserial.h | Binary serialization |
| bspsc.h | Single producer single consumer queue |
| barg.h | CLI argument parsing |
| bmacro.h | Commonly used macros |
| bminmax.h | Min/Max/Clamp macros using _Generic |
| btest.h | Unit test framework (based on autolist) |
| blog.h | Logging, with short filenames |
| qoi.h | Quite OK image encoding/decoding |
| bent.h | Entity component system |
| bsv.h | Binary seriallization with explicit versioning |
| bstacktrace.h | Portable stacktrace with source mapping |
| bcrash_handler.h | Crash handler |
Each one has example and documentation in the corresponding tests directory.
Tested on:
- Linux (GCC+Clang)
- Windows (MSVC)
Whenever a library needs to allocate memory a memctx argument can be passed to it.
By default it uses libc for memory and memctx is ignored.
The macro <NAME>_REALLOC can be used to override the allocator.
BLIB_REALLOC is also recognized as a catch-all allocator.