kindling-runtime
The anvil-first integration facade for kindling:
one Cargo dependency that bundles daemon startup, client wiring, and durable
emit, so a Rust downstream needs one binary and gets daemon semantics
without a separate kindling CLI install.
It composes the existing crates — it does not fork their wire shapes:
kindling-clientfor the HTTP-over-UDS surface- the opt-in
spoollayer for durable emit (SpooledClient) kindling-serverstarted in-process on a tokio taskkindling-typesre-exported askindling_runtime::types
kindling is mechanism, not policy: the runtime owns process lifecycle and client wiring; it does not encode downstream governance.
Quickstart
[]
= "0.2" # default features: client + spool + embedded-daemon
= { = "1", = ["rt-multi-thread", "macros"] }
use ;
use ;
async
Attach-or-start
Runtime::start never pre-emptively starts a daemon. It builds a client for the
configured socket; the client only spawns when the socket does not answer. So if
a daemon (the CLI, a Claude Code hook, or another runtime) is already listening
on the same socket, the runtime attaches to it. Use
runtime.spawned_embedded_daemon() to tell whether this process started the
daemon (true) or attached to an existing one (false).
SpawnStrategy selects what happens when a spawn is actually required:
| Strategy | Behaviour | Feature |
|---|---|---|
Embedded (default) |
start kindling-server in-process on a tokio task |
embedded-daemon |
External |
exec the real kindling binary on PATH |
external-spawn |
AttachOnly |
never spawn — attach to a running daemon or error | (always) |
Feature flags
| Feature | Default | Pulls | Purpose |
|---|---|---|---|
client |
yes | kindling-client |
HTTP client surface |
spool |
yes | kindling-client/spool |
SpooledClient as primary API |
embedded-daemon |
yes | kindling-server |
in-process serve() |
external-spawn |
no | — | fall back to kindling on PATH |
To trim binary size (drop the embedded server + store), disable default features and opt back into only what you need:
= { = "0.2", = false, = ["client", "spool", "external-spawn"] }
License
Apache-2.0