Expand description
§crackle-runtime
The crackle glaze forms in the cooling, not the firing.
A task execution framework where tasks have a firing phase (hot execution) and a cooling phase (deferred pattern detection). During cooling, the runtime detects emergent patterns across completed tasks that weren’t visible during execution.
§Core Metaphor
In pottery, the most beautiful moment is not the firing — it’s the cooling. The glaze and clay contract at different rates, producing craze lines: unique, unrepeatable patterns that record the history of the transformation. You cannot design these cracks. You can only create the conditions for them and get out of the way.
Similarly, crackle-runtime executes tasks (firing) and then observes what patterns
emerge across completed tasks during a cooling phase — patterns that were invisible
during the heat of execution.
§Quick Start
use crackle_runtime::{CrackleTask, Kiln, ThermalProfile, GlazeLayer, TaskOutput};
use std::time::Duration;
/// A simple task that produces a number
struct NumberTask { value: f64 }
impl CrackleTask for NumberTask {
type Output = f64;
fn fire(&self) -> TaskOutput<Self::Output> {
TaskOutput::new(self.value, vec![("magnitude".into(), self.value.abs())])
}
}
// Build a kiln with fast cooling (more cracks, more patterns)
let mut kiln = Kiln::new(ThermalProfile::fast_cooling());
// Fire tasks
kiln.fire_task(NumberTask { value: 3.14 }).unwrap();
kiln.fire_task(NumberTask { value: 2.71 }).unwrap();
// Let the kiln cool and detect patterns
let patterns = kiln.cool();
// Inspect what emerged
for pattern in &patterns {
println!("{:?}: {}", pattern.kind(), pattern.description());
}Structs§
- Clustering
Pattern - Detector for clustering patterns — tasks that complete near each other in metric space.
- Conservation
Pattern - Detector for conservation laws — metrics whose sum stays near-constant across tasks.
- Correlation
Pattern - Detector for unexpected correlations between tasks.
- Crackle
Pattern - A pattern detected during the cooling phase.
- Glaze
Layer - A decorator that adds pattern-detection capability to any task.
- Kiln
- The kiln — the runtime that fires tasks and cools them to detect patterns.
- Phase
Transition Pattern - Detector for phase transitions — shifts in output distributions.
- Task
Entry - A completed task entry stored in the kiln.
- Task
Metadata - Metadata about a task’s execution.
- Task
Output - The output of firing a task, including named metrics for pattern detection.
- Thermal
Profile - The thermal profile controls how the kiln cools.
- Timestamp
- A timestamp for when a task was fired or cooled.
Enums§
- Cooling
Rate - How fast the kiln cools — controls pattern sensitivity.
- Crackle
Error - Errors that can occur during crackle runtime operations.
- Pattern
Kind - The kind of pattern detected during cooling.
Traits§
- Crackle
Task - The core trait for tasks in the crackle runtime.
Functions§
- entropy
- Compute Shannon entropy of a set of continuous values.
- joint_
entropy - Compute joint entropy of two variables.
- jsd
- Compute Jensen-Shannon divergence between two distributions.
- kl_
divergence - Compute Kullback-Leibler divergence between two distributions.
- mutual_
information - Compute mutual information between two variables.
- permutation_
entropy - Compute permutation entropy of a time series.
- transfer_
entropy - Compute transfer entropy from X to Y.
Type Aliases§
- Result
- A specialized result type for crackle runtime operations.