vurtun/lib logo

vurtun/lib

Free

single header libraries for C/C++

FreeFree tier
Type
Open Source

About vurtun/lib

A collection of five single-file header-only libraries for C/C++ providing a JSON parser, multithreaded task scheduler, lightweight webserver, and deflate compression/decompression. Written in C89 for portability, each library includes inline documentation and examples. Libraries are distributed under permissive licenses (zlib or public domain).

Key Features

Non-allocating JSON parser (json.h)
Multithreaded task scheduler (sched.h)
Lightweight webserver (web.h)
Deflate compressor (sdefl.h) in public domain
Deflate decompressor (sinfl.h) in public domain
Single-file header-only for easy integration
Written in C89 for portability across compilers
Inline documentation and examples in each file

Pros & Cons

Pros
  • Zero dependencies: just drop in a single header file
  • Permissive licensing (zlib and public domain) for commercial use
  • Cross-platform: designed for C89 compatiblity
  • Well-documented with usage examples at top of each file
  • Small codebase (total ~4487 lines of C code)
Cons
  • Limited to five libraries; not a comprehensive collection
  • No active releases or versioning; relies on git commits
  • Not an AI or machine learning tool; pure utility libraries
  • No pre-built binaries; must be compiled into user project

Best For

Embedded software developmentGame development (asset loading, networking)Desktop applications requiring JSON parsingLightweight web server in C/C++ projectsAdding deflate compression to C/C++ projects

FAQ

Why single-file headers?
Windows lacks standard library directories, making deployment difficult. Single-file headers avoid link conflicts and are easy to drop into projects.
Why not two files (header + implementation)?
The difference between 10 files and 9 is minor, but 2 files vs 1 is a big deal for ease of distribution.
Where is the documentation?
Each file has documentation, basic usage description, and examples at the top. API functions, structs, and member variables are documented. Additionally, each library has a test file in the tests directory.