KaisenAmin/c_std
FreeImplementation of C++ standard libraries in C
About KaisenAmin/c_std
This project reimplements a large slice of the C++ Standard Library (containers, algorithms, smart pointers, …) together with many Python-style conveniences (statistics, random, secrets, json, regex, …) in pure C17. The goal is to give C developers familiar, well-documented building blocks — dynamic arrays, maps, strings, JSON, networking, big integers, and much more — without leaving the C ecosystem. The library is verified for zero memory leaks under Valgrind, cross-platform (Windows/Linux), and comes with 40+ modules including JSON, XML, CSV, networking, cryptography, arbitrary-precision math, and more. It offers familiar APIs modeled on C++ STL and Python standard library, and is heavily tested with deep per-module test suites.
Key Features
Pros & Cons
- Zero memory leaks guaranteed by Valgrind verification across all modules
- Large collection of 40+ modules covering a wide range of functionality
- Cross-platform out of the box (Windows and Linux)
- Pure C17 with no C++ runtime or compiler dependency
- Familiar APIs reduce learning curve for developers with C++ or Python background
- Comprehensive test suites and runnable examples ensure reliability
- Performance comparable to C++ STL for many operations (benchmarks provided)
- Some containers (e.g., vector) up to 1.3× slower than C++ STL in specific benchmarks
- Not as mature or extensively optimized as the C++ Standard Library
- May lack certain advanced C++ features (e.g., exceptions, templates-based SFINAE)
- Requires a C17-compatible compiler, which may limit support on very old systems