Skip to main content

Module live

Module live 

Source
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§

LiveDebugReport
Bounded runtime and render telemetry supplied by one connected client.
LiveDiagnostic
Serializable diagnostic detail carried by LiveError::Runtime.
LiveEvent
A command with its globally monotonic session sequence number.
LiveHistory
A bounded retained suffix of a live session’s event stream.
LivePeer
Public progress information for one live-session connection.
LiveRuntime
An explicitly stepped language runtime with a bounded, replayable journal.
ProgramSource
Source text and explicitly supplied modules for one language revision.

Enums§

LiveClientMessage
Client-to-host live-session wire message.
LiveCommand
An ordered, serializable state change accepted by a live language session.
LiveDebugStatus
Runtime state reported by a connected live-session client.
LiveError
A rejected live command or replay history. Rejections preserve committed state.
LiveRole
Authority granted to one connected live-session peer.
LiveServerMessage
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.