f1a1c9f1aef90307ba526d80b34610e4ada4c132
iKv
Standalone iKv C library.
Build:
- CMake:
cmake -S . -B build && cmake --build build - Scripted local build on Linux runners:
./demo/build.sh
Layout:
include/ikv.h: public API only.src/ikv.c: shared implementation and loader dispatch.src/loaders/ikv1.c: iKv1 loader.src/loaders/ikv2.c: iKv2 loader.src/internal/ikv_internal.h: private node layout and loader interface.
Behavior:
- The generic parse APIs auto-detect iKv1 vs iKv2 and choose the correct loader.
- The generic write APIs emit the current format version, which is
iKv2. - Public callers do not depend on loader-specific headers or internal structs.
iKv2binary files now use an indexed root layout with a key table and payload offsets.- Parsing an
iKv2binary file reads the root index first and loads individual top-level values on demand. iKv1binary files still use the legacy full-tree format for compatibility.
Adding a new version:
- Add
src/loaders/ikv3.handsrc/loaders/ikv3.cexporting anikv_loader_t. - Implement that loader using the shared internal helpers or custom logic.
- Register the loader in
src/ikv.c. - Add the new version constant to
include/ikv.hif it is part of the public API.
Description
Languages
C
95.4%
CMake
4.6%