Skip to content
alexw914Public

About

C++ lightweight foundation library

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

kitzoo

kitzoo is a lightweight, modular C++20 foundation library for Linux, macOS, and Windows. It aims to stay small: modules provide common building blocks as thin layers, reusing established C++ libraries instead of reimplementing them, and applications link only the modules they need.

Modules

Module Functionality
core Version information, command-line parsing, singletons, move-only callables, and scope guards.
utilities String processing, encoding, random values, UUIDs, and optional AES, SHA-256, and HMAC.
time Clocks, calendar conversion, elapsed measurements, timelines, and periodic callbacks.
os System queries, thread configuration, file/directory operations, and graceful shutdown.
memory Memory allocation, buffers, containers, and shared memory.
queue Blocking, lock-free SPSC and bounded MPMC, and concurrent queues.
thread Thread pools, object pools, and synchronization.
log Synchronous/asynchronous logging, file rollover, and retention.
json JSON parsing, file loading, and serialization.

CMake targets use the kitzoo::<module> naming convention.

Build and test

Requirements: CMake 3.25+, Ninja, Git, and a C++20 compiler (GCC, Clang, or MSVC). Dependencies are fetched during configuration. For MSVC, use an x64 Visual Studio Developer shell with the C++ desktop workload installed.

cmake -S . -B build/debug -G Ninja -DCMAKE_BUILD_TYPE=Debug -DKITZOO_BUILD_TESTS=ON
cmake --build build/debug --parallel
ctest --test-dir build/debug --output-on-failure

Tests and examples are enabled by default in standalone builds. Add -DKITZOO_BUILD_BENCHMARKS=ON to build benchmarks, or -DKITZOO_WITH_OPENSSL=ON to enable AES, SHA-256, and HMAC utilities with an installed OpenSSL development package. Executables linking kitzoo::memory replace the process malloc/new with mimalloc; -DKITZOO_MIMALLOC_OVERRIDE=OFF keeps the system allocator (always off on Windows and with sanitizers).

Clang and Ninja users can also use the Debug preset:

cmake --preset debug
cmake --build --preset debug
ctest --preset debug

See examples, tests, and platform build scripts for module usage and platform-specific build commands.

Use in another CMake project

FetchContent

Pin a release tag or commit:

include(FetchContent)
FetchContent_Declare(kitzoo
    GIT_REPOSITORY https://github.com/alexw914/kitzoo.git
    GIT_TAG v0.5.2)
FetchContent_MakeAvailable(kitzoo)

target_link_libraries(app PRIVATE kitzoo::core kitzoo::utilities)

Installed package

cmake --install build/debug --prefix /path/to/prefix

Configure your application with -DCMAKE_PREFIX_PATH=/path/to/prefix, then use:

find_package(kitzoo CONFIG REQUIRED)
target_link_libraries(app PRIVATE kitzoo::core kitzoo::utilities)

Reference

Project Purpose
spdlog Logging.
nlohmann/json JSON.
cxxopts Command-line parsing.
ConcurrentQueue Concurrent queues.
BS::thread_pool Thread pools.
mimalloc Memory allocation.
OpenSSL Cryptography.
GoogleTest Unit tests.
Google Benchmark Benchmarks.

About

C++ lightweight foundation library

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages