Euxis Library Architecture (libs/)¶
The Euxis C++ runtime is 27 static libraries under libs/, each owning one domain. Every library follows the same layout convention (include/euxis/<name>/ for public headers, src/ for implementations, tests/ for GTest sources) and is wired into the build through the euxis_add_library() CMake macro.
Version: v0.0.20 · Test files across libs/: 137 · Build tree: build/cmake-build/
Layout convention¶
Every library directory follows the same shape:
libs/<name>/
├── include/euxis/<name>/ Public headers (consumers see euxis/<name>/<header>.hpp)
├── src/ Implementation files (.cpp)
├── tests/ GTest sources (test_*.cpp)
├── CMakeLists.txt Calls euxis_add_library(euxis-<name>-cpp ...)
└── README.md (optional) Lib-specific contributor notes
The macro takes three sections — SOURCES, DEPS, TEST_SOURCES — and produces both the lib target and a *_tests executable in one call. Warnings-as-errors, C++23 standard, LTO settings, and GTest linkage are inherited from the root configuration.
Libraries by domain¶
Agentic core (5 libs)¶
Lib |
What it owns |
|---|---|
|
|
|
|
|
Verifier-quorum runner + real Claude/OpenAI/Gemini HTTP verifiers + deterministic mock verifier |
|
|
|
Custom benchmark runner, reporter, result matrix, plus three opt-in Google Benchmark binaries ( |
Protocol + transport (4 libs)¶
Lib |
What it owns |
|---|---|
|
A2A v0.2 JSON-RPC server, HTTP transport, WebSocket transport, msgpack-encoded agent card + task lifecycle |
|
Shared wire types — |
|
|
|
Channel adapters — Slack, Discord, Telegram, WhatsApp |
Verification + analysis (8 libs)¶
Lib |
What it owns |
|---|---|
|
OpenGrep-compatible rule-pack ingester + engine v2 ( |
|
Tree-sitter parsers for C, C++, Rust, Go, Python, JavaScript, TypeScript, Java |
|
Code-property graph: AST projection + intra-procedural CFG + DDG |
|
Forward data-dependency graph (DDG) taint analyzer |
|
Reachability analysis for the audit phase + ensemble scaffolding integration |
|
Canonical |
|
CycloneDX 1.6, SPDX 3.0.1, OpenVEX emission |
|
Cargo.lock and package-lock.json parsers feeding the SBOM stack |
|
Typosquat / package-name confusion guard (Spracklen USENIX 2025) |
|
DSSE signing (Ed25519), in-toto statements, SLSA, evidence bundles in the Sigstore Bundle layout |
Foundation primitives (7 libs)¶
Lib |
What it owns |
|---|---|
|
AES-GCM (cached key schedule, +33% throughput), BLAKE2b derivation, Ed25519 signing, libsodium primitives |
|
Libsodium-protected scan cache, content-hashed keys, SQLite-backed storage, |
|
Tiered-memory abstractions (hot / warm / cold) |
|
Identity and credential helpers |
|
Inter-process bridge abstractions |
|
Local + Docker execution backends ( |
|
|
Output (1 lib)¶
Lib |
What it owns |
|---|---|
|
Release packaging — TeX template substitution via inja, PDF emission, signed-artifact bundles |
Dependency graph¶
Strictly downward; no cycles. Verified by grepping every CMakeLists.txt DEPS block in this tree.
┌─────────────┐
│ apps/{cli, │
│ gateway, │
│ publisher, │
│ etx} │
└──────┬──────┘
│
┌───────────────────────────────────┼───────────────────────────────────┐
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌─────────────────┐ ┌─────────────────┐
│ runtime │ │ core │ │ ensemble │ │ scan/cpg/taint │
│ │◄──┤ │ │ → security │ │ → parse, sec. │
│ → sec. │ │ → crypto│ └────────┬────────┘ └────────┬────────┘
└────┬─────┘ │ metrics│ │ │
│ │ network │ ▼ ▼
│ └────────────┘ ┌─────────────────┐ ┌─────────────────┐
│ │ slopsquatting │ │ reach │
│ │ → sbom, sca, │ │ → cpg, parse, │
│ │ security │ │ security │
│ └────────┬────────┘ └─────────────────┘
│ │
▼ ▼
┌──────────┐ ┌──────────┐
│ inference│ │ sca │
│ →runtime│ │ → sbom │
└──────────┘ └──────────┘
Foundation tier (no euxis-internal deps):
crypto · cache · memory · identity · network · bridge · a2a-types · sbom · platform · adapters
The edges that matter most for refactoring: runtime → security (the agentic loop assembles Finding objects), inference → runtime (model engines consume IContextEngine / token estimation), ensemble → security (votes attach to findings), and scan/cpg/taint/reach → parse + security (the static-analysis stack).
The euxis_add_library macro¶
The macro is the standard wiring. Every lib uses it; consumers should too.
euxis_add_library(euxis-runtime-cpp
SOURCES
src/agent_loop.cpp
src/context_engine.cpp
src/tool_manifest.cpp
src/tool_registry.cpp
# … etc
DEPS
nlohmann_json::nlohmann_json
spdlog::spdlog
yaml-cpp
euxis-security-cpp
TEST_SOURCES
tests/test_agent_loop.cpp
tests/test_context_engine.cpp
# … etc
)
The macro creates the library target, links GTest into a <target>_tests executable, applies warnings-as-errors, registers the install target, and adds the test binary to CTest. Consumers don’t have to hand-roll any of that.
Extension guidelines¶
Adding a new library¶
Create
libs/<name>/{include/euxis/<name>/,src/,tests/}andlibs/<name>/CMakeLists.txt.Inside the CMakeLists, call
euxis_add_library(euxis-<name>-cpp ...)with the three sections.Add
add_subdirectory(libs/<name>)to the rootCMakeLists.txtin dependency order (libs that depend on yours must come after).Public headers live under
include/euxis/<name>/so consumers include them as#include "euxis/<name>/<header>.hpp".
Rules¶
One domain per library. Don’t park HTTP transport in
crypto; spin upnetworkor extenda2a.No circular dependencies. If
runtimedepends onsecurity, thensecuritymust not depend onruntimeeven transitively.Stable public surface. The headers under
include/euxis/<name>/are the API contract. Move implementation details into thesrc/tree, not into headers.Tests opt in. Every lib carries at least one test source; the
_teststarget is created automatically by the macro.Forward-compat hooks live in the consuming lib. When a feature needs
__cpp_lib_generator/__cpp_lib_reflection/__cpp_contracts, the guard goes in the consuming lib’s header. Seelibs/runtime/include/euxis/runtime/streaming.hppfor the pattern.
Euxis v0.0.20 · Build something that matters.