| GitHub | YouTube |
| Home | Projects | Resume |
| Project Links |
|---|
| Github |
registry.c is a simple, lightweight, and easy to use registry library for C.
I made this for Endian, which needed a lot of registries (at least, until I switched to my Static Code Generation).
A registry is a data structure for storing a lot of data, made for slow writes but fast reads. In my library, registries are generic, meaning that they can store any data type. Internally, it stores data in an ordered array, so that it can find an item using a binary search.
The binary search uses a comparison function for the binary search, which is provided by the caller upon the registries initialization. The caller can also provide a cleanup function, which makes it very easy to prevent memory leaks!
I put a lot of effort into making this performant and simple to understand, and the effort has paid off! I have already been able to use this library in multiple different projects.