3
Getting Started
GigabiteStudios edited this page 2026-06-17 19:24:43 -05:00

Getting Started

Requirements

  • A C++17 compiler
  • CMake 3.16 or newer
  • Git, including submodule support

Clone and build

git clone --recurse-submodules https://dock-it.dev/iDENTITY-Technology/iKvxx.git
cd iKvxx
cmake -S . -B build -DIKVXX_BUILD_TESTS=ON
cmake --build build
ctest --test-dir build --output-on-failure

If the repository was cloned without submodules:

git submodule update --init --recursive

On Windows, the repository includes a complete runner:

tests\run.bat
tests\run.bat Debug

Add iKvxx directly:

add_subdirectory(path/to/iKvxx)
target_link_libraries(your_app PRIVATE ikvxx::ikvxx)

Then include the public header:

#include <ikvxx/ikvxx.hpp>

First program

#include <ikvxx/ikvxx.hpp>
#include <iostream>

int main()
{
    ikv::Value root(ikv::objectValue, "settings");
    root["fullscreen"] = true;
    root["width"] = 1920;
    root["height"] = 1080;

    auto audio = root.makeObject("audio");
    audio["volume"] = 0.75;
    audio["muted"] = false;

    root.write("settings.ikv");

    auto loaded = ikv::Value::load("settings.ikv");
    std::cout << loaded["width"].asInt() << '\n';
}

The Value root owns the complete C tree. No manual cleanup is necessary.

Next steps