Expand description
Deterministic, replayable command journal for a live language session.
The journal is an in-memory protocol. It never reads files, invokes host registries, or repeats external effects while replaying accepted commands.
use konjure_lang::{LiveCommand, LiveRuntime};
use std::collections::BTreeMap;
let mut session = LiveRuntime::new();
let event = session.apply(LiveCommand::Load {
source: "let ball = spawn(Sphere { radius: 1 });".into(),
modules: BTreeMap::new(),
})?;
assert_eq!(event.sequence, 1);
let history = session.history().clone();
let mut replay = LiveRuntime::new();
replay.restore(history)?;
assert_eq!(replay.snapshot(), session.snapshot());Modules§
- pairing
- Camera-readable join links for the browser and native live-session hosts.
Structs§
- Live
Debug Report - Bounded runtime and render telemetry supplied by one connected client.
- Live
Diagnostic - Serializable diagnostic detail carried by
LiveError::Runtime. - Live
Event - A command with its globally monotonic session sequence number.
- Live
History - A bounded retained suffix of a live session’s event stream.
- Live
Peer - Public progress information for one live-session connection.
- Live
Runtime - An explicitly stepped language runtime with a bounded, replayable journal.
- Program
Source - Source text and explicitly supplied modules for one language revision.
Enums§
- Live
Client Message - Client-to-host live-session wire message.
- Live
Command - An ordered, serializable state change accepted by a live language session.
- Live
Debug Status - Runtime state reported by a connected live-session client.
- Live
Error - A rejected live command or replay history. Rejections preserve committed state.
- Live
Role - Authority granted to one connected live-session peer.
- Live
Server Message - Host-to-client live-session wire message.
Constants§
- MAX_
ARGUMENT_ BYTES - Maximum serialized arguments in one invocation command.
- MAX_
CUMULATIVE_ TICKS - Maximum fixed ticks accepted across one loaded revision.
- MAX_
EVENTS - Maximum events retained in one journal suffix.
- MAX_
JOURNAL_ BYTES - Maximum serialized retained journal bytes.
- MAX_
SOURCE_ BYTES - Maximum combined UTF-8 source and module bytes in one revision.