Shared Rust library for HyperI services. Wire three lines at startup and you
get config cascade, structured logs, Prometheus metrics, health probes, OTel
traces, graceful shutdown, K8s pre-stop, and deployment-artefact generation
for free. Add a Transport, a TieredSink, a BatchEngine and the same
deal extends: counters, span propagation, DLQ routing, backpressure, scaling
signals — all automatic.
This is the index. Read ARCHITECTURE.md for the 10,000-foot view of how the modules fit together, INTEGRATION.md for a recipe walkthrough on building a DFE service, AUTO-WIRING.md for the "you-get-this-for-free" model, and FEATURE-FLAGS.md for how features cascade into one another.
| Wire this at startup | And these come along | No need to |
|---|---|---|
config::setup(opts) |
8-layer cascade, env-var nesting, .env, sensitive masking, hot-reload, /config admin endpoint, section registry |
Wire figment, write a settings loader, build a reload watcher |
logger::setup_default() |
Structured tracing, JSON-in-container / human-on-TTY autodetect, RFC 3339 timestamps, sensitive-field masking, flooding helpers | Install a tracing subscriber, format JSON, pick a logger crate |
MetricsManager::new("app") |
Prometheus exporter, /metrics endpoint, process metrics, cardinality cap, /metrics/manifest catalogue |
Stand up an exporter, wire a process collector, hand-roll a manifest |
ServiceRuntime::new(...) |
All of the above + memory guard + scaling pressure + worker pool + batch engine + shutdown token + K8s pre-stop delay + runtime context | Glue them together manually; six modules wire themselves |
Any Transport impl |
3-tier filter engine, DLQ routing, per-direction/action metrics, W3C traceparent propagation | Add filters, wire DLQ, instrument send/recv |
TieredSink::new(...) |
Transport + disk-spillover spool + circuit breaker + retry + DLQ fallback + backpressure signal | Compose those primitives by hand |
That's the value proposition. Everything else in these docs is "and here's how the pieces work".
flowchart TB
subgraph App["DFE app"]
Cfg["Config::default()"] --> SR["ServiceRuntime::new()"]
end
subgraph Pillars["Core pillars (auto-wired)"]
Config
Logger
Metrics
OTel
Health
Shutdown
end
subgraph Runtime["Runtime"]
RC["RuntimeContext (K8s/Docker/BareMetal)"]
MG["MemoryGuard"]
SP["ScalingPressure"]
WP["WorkerPool"]
BE["BatchEngine"]
end
subgraph Pipeline["Pipeline"]
T["Transport (Kafka/gRPC/HTTP/Redis/...)"]
TF["TransportFilterEngine"]
TS["TieredSink"]
SPL["Spool"]
DLQ
end
subgraph Deploy["Deployment artefacts"]
DC["DeploymentContract"]
DF["Dockerfile"]
CH["chart/"]
AC["argocd-application.yaml"]
end
SR --> Pillars
SR --> Runtime
Pipeline --> Pillars
TF -.-> T
TS --> T
TS --> SPL
TS --> DLQ
DC --> DF
DC --> CH
DC --> AC
Solid arrows are runtime data/control flow. Dashed arrows mark embedded sub-components (filter engine lives inside every transport).
- ARCHITECTURE.md — module map, dependency graph, layering
- INTEGRATION.md — "I'm building a DFE app" walkthrough
- AUTO-WIRING.md — what's wired into what, and why
- FEATURE-FLAGS.md — feature tree, native deps, recommended bundles
- SELF-REGULATION.md -- ON by default; the three brains (MemoryGuard / ScalingPressure / UnifiedPressure), observe + tune
- BACKPRESSURE.md -- gate the source never the sink; the per-stage brake/commit-token table; streaming sub-blocks
- KAFKA-PATH.md -- the three batch sizes, sizing profiles + librdkafka names, rho~0.7 loop, partition-limited diagnostic
- core-pillars/CONFIG.md — 8-layer cascade, hot-reload, registry,
/configendpoint - core-pillars/LOGGING.md — tracing setup, JSON/text autodetect, masking, flood control
- core-pillars/METRICS.md — Prometheus, manifest, cardinality cap
- core-pillars/TRACING.md — OTel, W3C traceparent, transport propagation
- core-pillars/HEALTH.md —
HealthRegistry,/healthz//readyz//startupz - core-pillars/SHUTDOWN.md —
CancellationToken, K8s pre-stop delay
- runtime/SERVICE-RUNTIME.md —
ServiceRuntime,DfeApptrait,run_app - runtime/RUNTIME-CONTEXT.md — K8s/Docker/BareMetal detection, pod metadata
- runtime/MEMORY.md —
MemoryGuard, cgroup-aware backpressure
- transport/OVERVIEW.md — trait architecture, factory,
AnySender, commit tokens - transport/BACKENDS.md — Kafka, gRPC, Memory, File, Pipe, HTTP, Redis
- transport/FILTER-ENGINE.md — 3-tier filter (SIMD / compiled CEL / complex CEL)
- transport/ROUTING.md —
RoutedSenderfor receiver and fetcher
- deployment/CONTRACT.md —
DeploymentContractstruct, schema versioning - deployment/ARTEFACTS.md — generated Dockerfile, Helm chart, ArgoCD Application
- deployment/NATIVE-DEPS.md —
NativeDepsContract, feature → APT package map - deployment/KEDA.md —
KedaContract, scaler triggers, fallback HPA
- pipeline/BATCH-ENGINE.md — SIMD parse, pre-route filter, field interning
- pipeline/WORKER-POOL.md —
AdaptiveWorkerPool, pressure-based scaling - pipeline/TIERED-SINK.md — resilient delivery, disk spillover, circuit breaker
- pipeline/DLQ.md — file, Kafka, HTTP, Redis backends
- pipeline/SPOOL.md — disk-backed async FIFO (yaque)
- pipeline/STRMATCH.md — 4-tier regex→fast-path matcher (Byte / Literal / LiteralSet / Regex)
- pipeline/SCALING.md —
ScalingPressure, KEDA external scaler signal
- api/SECRETS.md — OpenBao/Vault, AWS Secrets Manager
- api/HTTP-SERVER.md — axum server, probe wiring, route extensions
- api/HTTP-CLIENT.md —
reqwest+ retry + circuit breaker - api/CACHE.md — moka TinyLFU cache
- api/DIRECTORY-CONFIG.md — YAML directory store with optional
git2 - api/CONCURRENCY.md —
BackgroundSink,PeriodicWorker,ActorHandle
- Content-based log scrubbing (gitleaks rules + PII validators
composed via
strmatch). The current release ships field-name masking viaMaskingWriteronly — see core-pillars/LOGGING.md for what's shipped.
- superpowers/ — design specs and execution plans for in-flight work
- MIGRATIONS.md — API surface changes by rustlib version; consumer-rebuild playbook
- Crate: hyperi-rustlib (crates.io)
- Edition: 2024
- MSRV: see
rust-versioninCargo.toml - Used by: dfe-loader, dfe-receiver, dfe-fetcher, dfe-archiver, dfe-transform-vrl, dfe-transform-vector
- Sibling libs: hyperi-pylib (Python equivalent)