Skip to content

Excse/exkit

Repository files navigation

exkit

exkit is a small C++20 task execution library for dependency-aware workloads. It lets you build a graph of tasks, express dependencies between them, and run the graph on a thread pool so independent tasks can execute in parallel.

Features

  • Dependency-aware task scheduling
  • Parallel execution on a configurable thread pool
  • Support for value-returning and void tasks
  • Exception propagation through task results
  • CMake package export with find_package(exkit) support

Quick Start

Build

Configure the project with the options defined in the root CMake file:

  • BUILD_TESTING enables or disables the test suite.
  • MAKE_INSTALLABLE enables or disables install rules.
  • BUILD_SHARED_LIBS controls whether the library is built shared or static.
cmake -S . -B build -DBUILD_TESTING=ON -DMAKE_INSTALLABLE=ON -DBUILD_SHARED_LIBS=ON
cmake --build build

Test

ctest --test-dir build --output-on-failure

Install

cmake --install build

Usage

Create tasks first, then connect dependent tasks, and finally call run():

#include <exkit/exkit.hpp>

int main() {
    Exkit exkit;

    auto fetch = exkit.task([]() { return 7; });
    auto transform = exkit.task([](int value) { return value + 35; }, fetch);
    auto total = exkit.task([](int value) { return value + 378; }, transform);

    exkit.run();

    return total.get() == 420 ? 0 : 1;
}

The corresponding pattern in the tests is covered in tests/exkit/task.cpp.

CMake Integration

The exported target name is exkit::exkit.

find_package(exkit REQUIRED)

target_link_libraries(your_target PRIVATE exkit::exkit)

The package config is generated from the files in cmake/Config.cmake.in and installed under the exkit package name.

Project Layout

include/exkit/   Public headers
src/exkit/       Library implementation
tests/           GoogleTest-based test suite
cmake/           Package configuration template
docs/            Doxygen theme assets

Documentation

Doxyfile is included for local API documentation generation with Doxygen.

About

A dependency-aware task execution engine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Generated from Excse/cmake-template