C header-only

Open-source C projects categorized as header-only

Top 23 C header-only Projects

header-only
  1. nuklear

    A single-header ANSI C immediate mode cross-platform GUI library (by Immediate-Mode-UI)

    Project mention: Ask HN: What Are You Working On? (July 2026) | news.ycombinator.com | 2026-07-12

    I'm working on better UI for my app AutoPTT [1]. It's probably going to look somewhat similar to Discord's settings, except I won't be using Electron. I refuse to use bloated stuff like that, so I'm going to keep using a pure C UI library [2].

    Obviously this is going to take a bit more work but at least the resource usage will stay low, which I consider quite important. Especially since gamers are a large portion of the user base.

    [1] https://autoptt.com/

    [2] https://github.com/Immediate-Mode-UI/Nuklear

  2. AppSignal

    AppSignal knows why the f*#k it crashed. Stop vibe-debugging. Every exception, every backtrace, grouped so you see patterns, not noise.

    AppSignal logo
  3. pocketpy

    Portable Python 3.x Interpreter in Modern C for Game Scripting

    Project mention: Pocketpy: Portable Python 3.x interpreter written in C11 | news.ycombinator.com | 2026-07-21
  4. librg

    🚀 Making multi-player gamedev simpler since 2017

  5. metalang99

    Full-blown preprocessor metaprogramming

    Project mention: Recursive macros in C, demystified (once the ugly crying stops) | news.ycombinator.com | 2025-11-05

    The CPP does allow quite advanced metaprogramming, it's just so obtuse to use and requires insane hacks so almost nobody does. See one of my favorite projects https://github.com/hirrolot/metalang99

  6. zpl

    📐 Pushing the boundaries of simplicity

  7. minicoro

    Single header stackful cross-platform coroutine library in pure C.

    Project mention: Minicoro: Single header stackful cross-platform coroutine library in pure C | news.ycombinator.com | 2025-11-14
  8. uuidv47

    ⚡ UUIDv47 = v4 privacy + v7 performance

    Project mention: Avoid UUIDv4 Primary Keys | news.ycombinator.com | 2025-12-15
  9. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  10. rawdraw

    Primitive Platform Agnostic Windowing+Input Header-Only Library

  11. VEFontCache

    Single-header minimalistic pragmatic GPU font rendering library.

  12. Tina

    Tina is a teeny tiny, header only, coroutine and job library.

  13. ctl

    My variant of the C Template Library (by rurban)

  14. tiny-dream

    Tiny Dream - An embedded, Header Only, Stable Diffusion C++ implementation

  15. RSGL

    A simple-to-use modular, cross-platform graphics library. It combines the freedom of lower-level graphics libraries with modern C techniques, offering both simplicity and convenience.

  16. CParseC

    Single header Parser Combinators for C

    Project mention: Single header Parser Combinators for C | news.ycombinator.com | 2026-06-30
  17. libcester

    A robust header-only unit testing framework for C and C++ programming language. Support function mocking, memory leak detection, crash report.

  18. TurboStitchGIF-HeaderOnly-Fast-ZeroAllocation-PlatformIndependent-Embedded-C-GIF-Decoder

    TurboStitchGIF: A fast, header-only C GIF decoder without dynamic allocations, ideal for embedded systems and cross-platform projects.

    Project mention: Show HN: TurboStitchGIF GIF decoder that lets you choose: safety or speed | news.ycombinator.com | 2026-02-22

    Version 1.2 introduces two LZW backends (safe bounds-checked vs unsafe turbo), micro-cache for 30-40% faster decoding, three output formats (RGB888/RGB565LE/RGBA8888), span-based turbo blit, optional 256KB RGB565 map2 for 2-pixel-at-once rendering, proper disposal method 3 support, renderer API for indexed output, safety toggles to disable checks when you need raw speed, and prefix mode to avoid symbol conflicts — all while staying 100% malloc-free on a user-provided scratch buffer.

    Repo: https://github.com/Ferki-git-creator/TurboStitchGIF-HeaderOn...

  19. easy_memory

    A strictly typed, platform-agnostic, and safe memory management system for C. Features arbitrary alignment, triple-key LLRB tree, and zero-dependency bare-metal support.

  20. sgc

    Generic Algorithms and Data Structures in C

  21. rexo

    Neat single-file cross-platform unit testing framework for C/C++.

  22. OpenCSTL

    Drop-in C++ STL for C — same push_back, insert, begin/end. Header-only.

    Project mention: Implementing C++ STL containers in pure C — what I learned | dev.to | 2026-04-08

    Source is here if anyone wants to look at the macro internals: https://github.com/springkim/OpenCSTL

  23. Canon-C

    A standard library for formally-verified C — with explicit, composable primitives that can scale.

    Project mention: Show HN: Canon-C – a semantic C library | news.ycombinator.com | 2026-02-09
  24. exile.h

    Painless Linux sandboxing API

  25. pega-texto

    Single-file Parsing Expression Grammars (PEG) runtime engine for C

  26. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

C header-only discussion

Log in or Post with

C header-only related posts

Index

What are some of the best open-source header-only projects in C? This list will help you:

# Project Stars
1 nuklear 11,440
2 pocketpy 2,130
3 librg 1,501
4 metalang99 1,090
5 zpl 1,067
6 minicoro 986
7 uuidv47 750
8 rawdraw 482
9 VEFontCache 383
10 Tina 295
11 ctl 288
12 tiny-dream 269
13 RSGL 205
14 CParseC 91
15 libcester 67
16 TurboStitchGIF-HeaderOnly-Fast-ZeroAllocation-PlatformIndependent-Embedded-C-GIF-Decoder 50
17 easy_memory 43
18 sgc 37
19 rexo 31
20 OpenCSTL 27
21 Canon-C 20
22 exile.h 18
23 pega-texto 18

Sponsored
AppSignal knows why the f*#k it crashed.
Stop vibe-debugging. Every exception, every backtrace, grouped so you see patterns, not noise.
www.appsignal.com

Did you know that C is
the 6th most popular programming language
based on number of references?