# stclib/STC

A modern, user friendly, generic, type-safe and fast C99 container library: String, Vector, Sorted and Unordered Map and Set, Deque, Forward List, Smart Pointers, Bitset and Random numbers.

Repository: https://github.com/stclib/STC
Canonical: https://ross.abutalabs.com/products/stclib-stc
Language: C
License: MIT
License Family: permissive
Last push: 2026-08-10T13:05:44+00:00

## Health v2 (maintenance only)
Score: 66/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 8, longevity 100
- inputs: {"age_days": 2374, "days_push": 23, "days_rel": 598, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1961, forks 114 (observed 2026-08-28T04:05:59.552715+00:00)

## What it is
STC is a generic, type-safe, high-performance container and algorithm library for C99/C11, providing strings, vectors, maps, sets, deques, lists, smart pointers, bitsets, spans, coroutines, and random numbers via macro-based templates. It aims to bring modern ergonomics from languages like Rust, Zig, and C++ to C with minimal boilerplate.

## Use cases
- use hash maps and sets in C without writing boilerplate
- get a type-safe dynamic array or vector in C99
- add coroutines with structured concurrency to a C program
- replace C++ STL containers in a pure C codebase
- use smart pointers and reference counting in C
- do regex matching on UTF-8 strings in C
- slice multi-dimensional arrays like numpy in C

## When to choose
- you write C99/C11 and want modern, fast, type-safe data containers
- you need maps, sets, deques, or strings without external dependencies
- you want coroutines or smart pointers in plain C
- performance and low overhead matter more than ABI-stable prebuilt libraries

## When to avoid
- your project requires a stable, frozen API before the V6.0 final release
- you prefer C++ STL or a language with native generics
- you dislike macro-heavy templating in C codebases

## Facets
- artifact type: library
- maturity: active
- function: concurrency, math, parser
- domain: programming-languages, developer-tools
- platform: c, cpp, cross-platform, windows
- tags: containers, data-structures, c99, generic-macros, type-safe, coroutines, regex, smart-pointers, bitset, hashmap, no-boilerplate, algorithms, linux, macos

## Member repositories
- stclib/STC (main) score 66

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:59.552715+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-30T03:05:39.907743+00:00, confidence not recorded.
  - readme: https://github.com/stclib/STC (fetched 2026-08-28T04:05:59.552715+00:00, sha 71f13780db1d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
