a c++20 modern DAG framework
see design in target.md
include/runlab/: C++20 headers.runtime.hpphosts the thread-pool DAG engine;dataflow.hppis the stdexec-native runtime (pure value channels, kernel registry binding).kernels.hppholds sample implementation of basic computation unit;sender.hpphas helper adapters.bindings/pybind_module.cpp: pybind11 DSL layer base on the cpp runtime.tests/: C++ test executables (seetests/test_runtime.cppfor end-to-end DAG checks).examples/: quick usage samples (Python and C++).thirdparty/stdexec/: vendored stdexec. Treat as upstream-only.
- Kernels are pure operator that can be register and instantiation by
kernel_idat runtime - Graph orchestration is restricted to
kernel_id + config + inputs;GraphBuilder::compilebindsKernelDef::bind(config)once and runs a single concrete sender type per node. Inject DSL/config at the binding layer, not inside kernels. - Resources (e.g. global/dag-shared) are expected monad based implementation.
- Multiple DAGs can be installed and run independently; keep graph IDs unique and contexts isolated.
- Configure:
cmake -S . -B build(add-DCMAKE_BUILD_TYPE=Debugas needed). - Build:
cmake --build build. - Tests:
ctest --test-dir buildor./build/runlab_tests. - Python example (after building with bindings on):
python examples/example.py.
- C++20 modern and elegant framework library
- Prefer Functional Programming, monad style
- Free to refract interface without concerning about compatibility
- Framework which acquire high performance implementation
- Types
PascalCase, functionssnake_case, fileslower_snake_case. - Prefer sender/receiver P2300 model
- Prefer stdexec-native composition; avoid new type erasure layers unless aligned with
exec::any_sender.
- Keep tests direct. Mirror patterns in
tests/test_runtime.cpp: deterministic inputs, explicit failure messages, non-zero exit on failure. - When adding kernels, cover both success and error propagation; verify fan-out/fan-in if applicable.
- Use short, imperative subjects (e.g.,
Add bias kernel binding). Separate logical changes. - PRs should state behavior changes, key commands run (
cmake,ctest), and any API notes (kernel signatures, env queries). Include repro snippets if bindings or DSL change.