Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality. Learn more →
Top 20 C header-only Projects
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
libcester
A robust header-only unit testing framework for C and C++ programming language. Support function mocking, memory leak detection, crash report.
-
radian
Header-only library of macros to assist with reading and writing big/little endian values. (by raddari)
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
There are also other approaches. Macro variants making use of `__VA_ARGS__` would be probably the best trade-off. If you want a slightly more ergonomic syntax, something like Metalang99 [1] will help (and the author even wrote a post about this exact subject [2]). Codegen is another option which may work better than other options depending on the situation and exact implementation strategy. And there is always the Reflection TS [3], which may or may not be incorporated to C++26...
[1] https://github.com/Hirrolot/metalang99
[2] https://hirrolot.github.io/posts/pretty-printable-enumeratio...
[3] https://en.cppreference.com/w/cpp/experimental/reflect
Project mention: How Much Memory Do You Need to Run 1M Concurrent Tasks? | news.ycombinator.com | 2023-05-21It would be interesting to bench something extremely lightweight (like https://github.com/edubart/minicoro) against these runtimes.
By my back-of-the-napkin math, 1,000,000 coroutines would cost about 64mb + 2mb/core for stacks.. which works out to about 4x less memory than the 'winner' of this comparison, and ~30x less than go.
Project mention: Tiny Dream – An Embedded, Header Only, Stable Diffusion C++ Implementation | news.ycombinator.com | 2023-09-26
Project mention: A header-only C implementation of C++ <algorithm> | news.ycombinator.com | 2023-07-03Well, I do like mine better, which is closer to the STL, and for all containers. https://github.com/rurban/ctl/
Project mention: Show HN: RK Test, a Google Test style library written in C99 | news.ycombinator.com | 2023-12-11I really like Google Test, but am planning on doing some embedded development in C, where I sometimes find it awkward to test C code using a C++ library.
Therefore, I wrote a small unit test library closely mimicking Google Test. It consists of two source files, "rktest.c" and "rktest.h", and is about 1k lines of code and written in C99.
It uses a trick for self registering tests by placing pointers to the unit test functions into a known place in program memory, that I first learned about from https://github.com/christophercrouzet/rexo/ and https://github.com/Snaipe/Criterion/.
Project mention: How do crypto functions deal with the issue of character size? (e.g. Unicode) | /r/cryptography | 2023-06-18Hey guys. If you remember me from several months ago, with this object de art, I am here with a less cringy question than that of 'I made a hash function!!!111'. I apologize if this question is basic btw. My question is, how do crypto functions, of any kind, deal with character size? For example in C, wchar_t is either 2 or 4 bytes. So, if the implementation goes through the stream like stream++ it will be stepping word-wise not byte-wise. And then if another machine, using a different implementation, reads the stream byte-wise and not word-wise, then it won't get the same message right?
C header-only related posts
- Using Jolt with flecs & Dear ImGui: Game Physics Introspection
- Factor is faster than Zig
- Tiny Dream – An Embedded, Header Only, Stable Diffusion C++ Implementation
- Tiny Dream - Header-Only, Embedded Stable Diffusion Inference Library in C++
- Tiny Dream – Header Only, Embedded Stable Diffusion C++ Library
- Tiny Dream – An Embedded, Header Only, Stable Diffusion C++ Implementation
- Possible security issues allowing multibyte chars?
-
A note from our sponsor - InfluxDB
www.influxdata.com | 26 Apr 2024
Index
What are some of the best open-source header-only projects in C? This list will help you:
Project | Stars | |
---|---|---|
1 | librg | 1,218 |
2 | zpl | 960 |
3 | earcut.hpp | 811 |
4 | metalang99 | 765 |
5 | minicoro | 577 |
6 | Tina | 250 |
7 | tiny-dream | 237 |
8 | ctl | 158 |
9 | libcester | 58 |
10 | sgc | 32 |
11 | rexo | 27 |
12 | pega-texto | 17 |
13 | Mathc | 15 |
14 | exile.h | 14 |
15 | roguelike.h | 10 |
16 | c-flags | 8 |
17 | PoxHash | 7 |
18 | cp437.h | 3 |
19 | c-allocators | 2 |
20 | radian | 1 |
Sponsored