Skip to content

Feature Flags

Kairos Substrate uses Cargo feature flags to control which capabilities are compiled into each target. This keeps binary sizes small and dependencies minimal — you only pay for what you use.

CrateFeatureDefaultDescription
kairos-engine-corelicenseYesEnables kairos-license dependency for license validation
kairos-engine-coretestingNoExposes Engine::new_unchecked() for tests — do not use in production
kairos-rosetta-inboundlicenseYesTurns on native policy/license/HITL cryptographic verification
kairos-rosetta-inboundfly-by-wireNoEnables SubstrateSession, action gating, hazard gating, session-side HITL with replay guard
kairos-rosetta-inbounddynamic-configNoEnables load_artifact() from filesystem at runtime
kairos-rosetta-inboundstatic-configNoEmbeds the artifact at compile time via get_artifact()
kairos-clituiNoEnables kairos observe TUI dashboard (pulls in ratatui, crossterm)
kairos-wasmfly-by-wireNoExposes WasmSession for browser/Node.js fly-by-wire
kairos-ffifly-by-wireNoExposes KairosSession FFI handle and all kairos_session_* functions
kairos-ffidynamic-configNoEnables research-mode constructors that accept runtime artifact paths
kairos-sentinelslmNoEnables local SLM narrative backend (SmolLM2-1.7B via candle)

Some features automatically enable features in dependency crates:

kairos-cli/tui
└─ kairos-rosetta-inbound/fly-by-wire
└─ kairos-engine-core (full engine)
kairos-wasm/fly-by-wire
└─ kairos-rosetta-inbound/fly-by-wire
kairos-ffi/fly-by-wire
└─ kairos-rosetta-inbound/fly-by-wire
Settingreleaserelease-native
opt-levelz (size)3 (speed)
ltotruetrue
codegen-units11
striptruetrue
TargetWASM onlyCLI, FFI, Python
Terminal window
cargo build -p kairos-cli --profile release-native

No TUI, no fly-by-wire. Supports evaluate, trace, policy, license, and scenario commands.

Terminal window
cargo build -p kairos-cli --features tui --profile release-native

Adds kairos observe with live telemetry, projections, Sentinel panel, and HITL operator mode.

Terminal window
cargo build -p kairos-ffi --profile release-native

C FFI with state gate evaluation. No session support.

Terminal window
cargo build -p kairos-ffi --profile release-native --features fly-by-wire

Adds KairosSession handle type with stateful evaluation, action preview, and hazard detection.

Terminal window
cargo build -p kairos-ffi --profile release-native --features fly-by-wire,dynamic-config

Adds runtime artifact loading for rapid iteration without recompilation.

Terminal window
wasm-pack build crates/kairos-wasm --release

Browser/Node.js evaluation without fly-by-wire session.

Terminal window
wasm-pack build crates/kairos-wasm --release --features fly-by-wire

Adds WasmSession for browser-side telemetry. Advisory only — no license enforcement.

AspectCompile-time (features)Runtime (files)
Session supportfly-by-wire feature
TUI dashboardtui feature
SLM backendslm featureModel bundle path
License validationlicense feature (default on)License key file
Calibration artifactstatic-config or dynamic-configJSON file path
Deployment policyJSON file path
HITL authoritiesIn deployment policy JSON
Enforcement modeIn deployment policy JSON
Gamma floorIn deployment policy JSON

Feature flags are compile-time decisions — they control which code paths exist in the binary. Everything else (calibration parameters, policy thresholds, HITL keys) is runtime configuration loaded from files.