#[non_exhaustive]pub struct RuntimeConfig {
pub kindling_home: PathBuf,
pub project_root: String,
pub spool_path: Option<PathBuf>,
pub spawn: SpawnStrategy,
}Expand description
Configuration for a Runtime.
#[non_exhaustive]: build via RuntimeConfig::embedded,
RuntimeConfig::with_home, or RuntimeConfig::from_default_home (then
mutate fields), so new fields can be added without a breaking change.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.kindling_home: PathBufRoot of the per-project databases and the daemon’s socket/pid/port files
(~/.kindling by default). Using the default layout shares the DB with
the kindling CLI and Claude Code hooks.
project_root: StringProject root string, sent as the X-Kindling-Project header on every
data endpoint for per-project DB routing.
spool_path: Option<PathBuf>Path to the durable-emit spool file. Defaults to <home>/spool.ndjson
when None. Only meaningful with the spool feature.
spawn: SpawnStrategyHow to obtain the daemon. Defaults to SpawnStrategy::Embedded.
Implementations§
Source§impl RuntimeConfig
impl RuntimeConfig
Sourcepub fn from_default_home(
project_root: impl Into<String>,
) -> Result<Self, RuntimeError>
pub fn from_default_home( project_root: impl Into<String>, ) -> Result<Self, RuntimeError>
Build a config rooted at the default kindling home (~/.kindling) for
project_root, with the default SpawnStrategy.
Errors only if no home directory can be determined.
Sourcepub fn embedded(project_root: impl Into<String>) -> Self
pub fn embedded(project_root: impl Into<String>) -> Self
Build an embedded-daemon config rooted at the default home for
project_root (the common anvil case).
Infallible: if no home directory can be determined it silently falls
back to .kindling in the current working directory. Prefer
from_default_home when you want a missing
home to surface as an error instead of a cwd-relative fallback.
Sourcepub fn with_home(
kindling_home: impl Into<PathBuf>,
project_root: impl Into<String>,
spawn: SpawnStrategy,
) -> Self
pub fn with_home( kindling_home: impl Into<PathBuf>, project_root: impl Into<String>, spawn: SpawnStrategy, ) -> Self
Build a config rooted at an explicit kindling_home (tests / isolated
hosts) with the given SpawnStrategy.
Sourcepub fn effective_spool_path(&self) -> PathBuf
pub fn effective_spool_path(&self) -> PathBuf
The effective spool path: the configured one, or <home>/spool.ndjson.
Trait Implementations§
Source§impl Clone for RuntimeConfig
impl Clone for RuntimeConfig
Source§fn clone(&self) -> RuntimeConfig
fn clone(&self) -> RuntimeConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more