https://github.com/brendanddev/struccs
A lightweight, generic C library of fundamental data structures. No dependencies, no standard container libraries.
https://github.com/brendanddev/struccs
algorithms data-structures memory-management
Last synced: 9 days ago
JSON representation
A lightweight, generic C library of fundamental data structures. No dependencies, no standard container libraries.
- Host: GitHub
- URL: https://github.com/brendanddev/struccs
- Owner: brendanddev
- License: mit
- Created: 2025-10-24T00:49:17.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2026-05-06T23:57:33.000Z (about 2 months ago)
- Last Synced: 2026-05-07T01:32:32.839Z (about 2 months ago)
- Topics: algorithms, data-structures, memory-management
- Language: C
- Homepage:
- Size: 467 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# struccs
A lightweight, generic C library of fundamental data structures built from scratch with a focus on memory management, performance, and type-agnostic design.
> Version 0.9.8
---
## Overview
A collection of generic, reusable data structures implemented in C using `void*` pointers,
function pointers, and manual memory management — no dependencies, no standard container
libraries.
---
## Structures
| Structure | Description |
|---|---|
| GenericArray | Type-agnostic dynamically resizing array |
| LinkedList | Doubly linked list with bidirectional traversal |
| Stack | LIFO structure backed by linked nodes |
| Queue | FIFO structure backed by linked nodes |
| HashTable | Generic hash table with separate chaining |
| BinarySearchTree | Generic BST with recursive operations |
| BinaryTree | Complete binary tree backed by flat array |
| Heap | Min/max heap |
| Set | In progres... |
---
## Project Structure
```
struccs/
├── include/ # Public headers
│ ├── generic_array.h
│ ├── linked_list.h
| ├── set.h
│ ├── stack.h
│ ├── queue.h
│ ├── hash_table.h
│ ├── binary_tree.h
│ ├── binarysearch_tree.h
│ └── heap.h
├── src/ # Implementations
│ ├── generic_array.c
│ ├── linked_list.c
│ ├── set.c
│ ├── stack.c
│ ├── queue.c
│ ├── hash_table.c
│ ├── binary_tree.c
│ ├── binarysearch_tree.c
│ └── heap.c
├── tests/ # Test suites
├── docs/ # Documentation
│ ├── USAGE.md
│ ├── API.md
│ └── PERFORMANCE.md
├── Makefile
├── LICENSE
└── README.md
```
---
## Building
Clone the repo and build the static library:
```bash
git clone https://github.com/brendanddev/struccs.git
cd struccs
make
```
This produces `build/libstruccs.a`.
To run a specific test:
```bash
make test_ga
make test_ll
make test_bt
# etc...
```
To run all tests:
```bash
make test_all
```
To clean build artifacts:
```bash
make clean
```
---
## Usage
Include the umbrella header to get everything:
```c
#include "struccs.h"
```
Or include individual headers:
```c
#include "generic_array.h"
#include "linked_list.h"
```
Link against the static library when compiling:
```bash
clang myprogram.c -I/path/to/struccs/include -L/path/to/struccs/build -lstruccs -o myprogram
```
See [docs/usage.md](docs/usage.md) for full code examples for each structure.
---
## Docs
- [Usage Examples](docs/USAGE.md)
- [API Reference](docs/API.md)
- [Performance](docs/PERFORMANCE.md)
---
## License
MIT License — see [LICENSE](LICENSE) for details.