Skip to main content

C++ SDK

The C++ SDK is a header-only library for writing TaskDaemon handlers.

Installation

Download the header file directly:
Or add as a git submodule:
Then include:

Dependencies

The SDK requires nlohmann/json. Install via your package manager:

Basic Usage

Task Struct

Result Functions

The result types:

Complete Example

Here’s the actual word count handler from the sample project:

Error Handling

Exceptions are automatically caught and converted to non-retryable errors:
For explicit error handling:

Compilation

Dockerfile

For an even smaller image:

Handler Configuration

Performance Notes

C++ handlers are ideal for:
  • CPU-intensive computations
  • Low-latency requirements
  • Memory-efficient processing
The header-only design means no runtime dependencies beyond the standard library and nlohmann/json.