SaaSHub helps you find the best software and product alternatives Learn more →
Top 23 C header-only Projects
-
Project mention: Nuklear: A minimal-state, immediate-mode graphical user interface toolkit | news.ycombinator.com | 2025-09-23
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
-
-
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
-
-
Earcut is almost a teaching example: pick any non-self-intersecting polygon, find an "ear" (three consecutive vertices that form an empty inner triangle), cut it off, repeat. Simple? Yes. Slow? Sometimes. But on contours with few points Earcut can be the fastest tool in the shed, as my benchmarks against iTriangle and Mapbox implementations have shown.
-
Project mention: Minicoro: Single header stackful cross-platform coroutine library in pure C | news.ycombinator.com | 2025-11-14
-
-
-
-
-
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.
-
libcester
A robust header-only unit testing framework for C and C++ programming language. Support function mocking, memory leak detection, crash report.
-
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-22Version 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...
-
-
-
Source is here if anyone wants to look at the macro internals: https://github.com/springkim/OpenCSTL
-
-
-
-
-
Canon-C
A semantic standard library for verified C — explicit, composable modules that add meaning without hiding behavior.
-
C header-only discussion
C header-only related posts
-
Canvas_ity: A tiny, single-header <canvas>-like 2D rasterizer for C++
-
Ask HN: What are you working on this weekend?
-
Starting Up The Engine - Nikola Game Engine Devlog 1
-
C: Simple Defer, Ready to Use
-
Using Jolt with flecs & Dear ImGui: Game Physics Introspection
-
Factor is faster than Zig
-
Tiny Dream – An Embedded, Header Only, Stable Diffusion C++ Implementation
-
A note from our sponsor - SaaSHub
www.saashub.com | 15 Jun 2026
Index
What are some of the best open-source header-only projects in C? This list will help you:
| # | Project | Stars |
|---|---|---|
| 1 | nuklear | 11,205 |
| 2 | pocketpy | 2,073 |
| 3 | librg | 1,481 |
| 4 | metalang99 | 1,069 |
| 5 | zpl | 1,062 |
| 6 | earcut.hpp | 992 |
| 7 | minicoro | 934 |
| 8 | rawdraw | 475 |
| 9 | Tina | 298 |
| 10 | ctl | 287 |
| 11 | tiny-dream | 265 |
| 12 | RSGL | 198 |
| 13 | libcester | 66 |
| 14 | TurboStitchGIF-HeaderOnly-Fast-ZeroAllocation-PlatformIndependent-Embedded-C-GIF-Decoder | 49 |
| 15 | sgc | 37 |
| 16 | rexo | 31 |
| 17 | OpenCSTL | 26 |
| 18 | pega-texto | 18 |
| 19 | exile.h | 18 |
| 20 | Mathc | 16 |
| 21 | c-flags | 12 |
| 22 | Canon-C | 12 |
| 23 | PoxHash | 8 |