C header-only

Open-source C projects categorized as header-only Edit details

Top 13 C header-only Projects

  • zpl

    📐 Pushing the boundaries of simplicity

  • earcut.hpp

    Fast, header-only polygon triangulation

    Project mention: TTF Parser, managed to triangulate simple polygons. Next will be inner holes. | reddit.com/r/C_Programming | 2022-04-06

    Have you looked into mapbox's earcut hpp library? https://github.com/mapbox/earcut.hpp

  • SonarLint

    Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.

  • metalang99

    Full-blown preprocessor metaprogramming

    Project mention: Metalang99: Full-blown preprocessor metaprogramming for C/C++ | reddit.com/r/cpp_instruments | 2022-08-09
  • minicoro

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

  • ctl

    My variant of the C Template Library (by rurban)

    Project mention: How different is C++ from C? Contrasting simple Unix SORT programs | reddit.com/r/cpp | 2022-05-13

    But the most common that I know of is this one: https://github.com/tylov/STC. There's also this one mentioned above https://rurban.github.io/ctl/

  • libcester

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

  • pega-texto

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

  • talent.io

    Download talent.io’s Tech Salary Report. Median salaries, most in-demand technologies, state of the remote work... all you need to know your worth on the market by tech recruitment platform talent.io

  • Mathc

    A simple and clean, glsl like, math (linear algebra) header only library for C.

  • exile.h

    Painless Linux sandboxing API

    Project mention: Show HN: Porting OpenBSD Pledge() to Linux | news.ycombinator.com | 2022-07-14

    Great work!

    >.. So how do we get it that simple on Linux? I believe the answer is to find someone with enough free time to figure out how to use SECCOMP BPF to implement pledge.

    > There's been a few devs in the past who've tried this. I'm not going to name names, because most of these projects were never completed.

    I guess I am also one of those. I am giving it a shot with my WIP sandboxing library, which aims at making sandboxing easier for applications in general: https://github.com/quitesimpleorg/exile.h. It also aims to fix the "file system blind spot" mentioned in the article, by using Landlock and Namespaces/chroot.

    Though I am calling my attempt "vows" instead of "pledge" to avoid misunderstandings. At the the end of the day, pledge() cannot be pledge() on Linux, due to limitations which the article also mentions.

    Nevertheless, as has already been mentioned in this thread, as all attempts, mine also suffers from the fact that one has to keep up constantly with kernel releases and all software must recompiled from time to time against new library releases. This is a suboptimal situation. Secondly, there systems calls with currently cannot be filtered with seccomp BPF, such as openat2() and clone3() and so on.

    Therefore, at this time you cannot have pledge() on Linux properly. So I am putting it on hold until deep argument inspection lands.

    Overall, my experience led me to believe in order to have true, partical pledge() on Linux, it must be implemented in the kernel ultimately.

  • cp437.h

    Header only codepage 437 unicode lookup table.

    Project mention: Easy minigames to put i c text game? | reddit.com/r/C_Programming | 2022-09-02

    If you want to use DOS characters in Unicode, here's a header-only library which does that: https://github.com/Journeyman-dev/cp437.h

  • c-flags

    Library for parsing command line arguments easily. Like golang flag module.

    Project mention: Parse command line arguments easily | reddit.com/r/u_glazzzkoff | 2022-02-15

    Repository link: https://github.com/DieTime/c-flags

  • radian

    Header-only library of macros to assist with reading and writing big/little endian values. (by raddari)

    Project mention: [Code Review] radian - a header-only library to help with endianness when reading/writing | reddit.com/r/cprogramming | 2022-03-14
  • c-allocators

    A collection of public domain single-file custom allocators for C/C++

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). The latest post mention was on 2022-09-02.

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 zpl 792
2 earcut.hpp 629
3 metalang99 563
4 minicoro 328
5 ctl 96
6 libcester 45
7 pega-texto 16
8 Mathc 12
9 exile.h 11
10 cp437.h 3
11 c-flags 2
12 radian 1
13 c-allocators 0
Find remote jobs at our new job board 99remotejobs.com. There are 5 new remote jobs listed recently.
Are you hiring? Post a new remote job listing for free.
Truly a developer’s best friend
Scout APM is great for developers who want to find and fix performance issues in their applications. With Scout, we'll take care of the bugs so you can focus on building great things 🚀.
scoutapm.com