A small collection of helper utilities and data structures used across several related projects.
utils provides reusable components that are shared among the following projects:
This repo mainly contains small data structures and helper utilities that support the implementation of those systems.
Although primarily developed for internal use in the projects listed above, the data structures are provided as a small library and can also be used in other C applications.
The library currently includes several basic data structures:
- blocking queue
- deque
- hash table
- red-black tree
This project does not aim to provide production-level data structure implementations, and testing and edge-case coverage are intentionally minimal.
Dependencies:
pthread
# 1. Clone the repository
git clone https://github.com/wjnlim/utils.git
# 2. Create a build directory
mkdir utils/build
cd utils/build
# 3. Configure with CMake
cmake -DCMAKE_INSTALL_PREFIX=<your install directory> ..
# 4. Build the data structure library
cmake --build . --target utils_ds
# 5. Install the library
cmake --install .Example programs are available in the repository:
To compile a program that uses this library (for example, including utils_ds/deque.h):
gcc your_prog.c -o your_prog -I <your install directory>/include \
<your install directory>/lib/libutils_ds.a -lpthread