# P-p-H-d/mlib

M*LIB is a library of generic and type safe containers / data structures in pure C language (C99 / C11) for a wide collection of container (comparable to the C++ STL).

Repository: https://github.com/P-p-H-d/mlib
Canonical: https://ross.abutalabs.com/products/mlib
Language: C
License: BSD-2-Clause
License Family: permissive
Topics: c, generic, list, array, tuples, variant, tree, collections, stack, string, bitset, algorithms, hashmap, priority-queue, queue, lock-free, json, set, data-structures
Last push: 2026-07-22T20:15:41+00:00

## Health v2 (maintenance only)
Score: 83/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 93, release rhythm 60, longevity 100
- inputs: {"age_days": 3483, "days_push": 42, "days_rel": 54, "gap_med": 214.0, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1154, forks 96 (observed 2026-08-28T04:03:47.606382+00:00)

## What it is
M*LIB is a header-only C library providing generic, type-safe containers and data structures (arrays, lists, hashmaps, trees, queues, strings, tuples, variants) comparable to the C++ STL, for C99/C11. It also includes algorithms, JSON/binary serialization, and thread-safe containers.

## Use cases
- use generic type-safe containers in pure C
- get an STL-like hashmap or vector in C99
- implement lock-free queues for worker threads
- serialize C data structures to JSON or binary
- build recursive container-of-container types with destructors

## When to choose
- you write C99/C11 and want STL-like containers without runtime dependencies
- you need compile-time type safety and custom constructors/destructors for container elements
- you want header-only integration with no build step

## When to avoid
- you are writing C++ and can use the standard library directly
- you need runtime-polymorphic containers rather than macro-generated types
- your toolchain lacks C99/C11 support

## Facets
- artifact type: library
- maturity: active
- function: serialization, concurrency, json
- domain: developer-tools, programming-languages
- platform: c, cpp, cross-platform
- tags: data-structures, containers, type-safe, header-only, stl-equivalent, lock-free, c99, c11, algorithms

## Member repositories
- P-p-H-d/mlib (main) score 83

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:47.606382+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:32:15.659754+00:00, confidence not recorded.
  - readme: https://github.com/P-p-H-d/mlib (fetched 2026-08-28T04:03:47.606382+00:00, sha 7a93d19e2af9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
