Skip to main content

Crate rite_runtime

Crate rite_runtime 

Source
Expand description

Execution runtime for Rite ceremonies.

rite-runtime defines the protocol that frontends use to drive a ceremony to completion, the executor that walks the ceremony plan, and the supporting machinery for transcripts and action handlers.

§Key types

§Stability

Internal crate. This is an implementation detail of the rite CLI, with no stable API and no semver guarantees across releases. Build against the public rite-sdk, rite-model, or rite-resolver crates instead.

Modules§

test_support
Test-only helpers for action implementors.

Structs§

ActionMetadata
Metadata describing an action, used for validation and presentation.
ActionRegistry
Registry mapping action types to their handlers.
BackendRegistry
Backend registry that owns all backend lifecycle state.
BackendVersion
A linked cryptographic backend library and its runtime version.
BuildInfo
Identity of the running rite binary. A property of the artifact, set at compile time; the strongly verifiable end of the trust boundary (checkable against a release tag and build provenance).
CeremonyRandom
The per-ceremony entropy source.
Disk
A block device and its mount, as shown in the System tab.
Draw
A value drawn from the source, paired with the path that derives it.
EntropyVerified
Outcome of re-deriving a transcript’s entropy source.
Environment
Live inventory of the machine’s attached devices.
ExecutionState
Complete execution state, recreated after each step.
ExecutionSummary
Summary returned by Executor::run on a successful completion.
Executor
Channel-driven executor. One per ceremony run.
FeatureCheck
A single security-feature determination: a machine-comparable status plus optional human context.
HandlerContext
Read-only view of execution state for handlers.
Hardening
Snapshot of platform memory- and DMA-protection features.
HostInfo
Identity of the host machine. A property of the environment, the weakly verifiable end of the trust boundary (an operator assertion that software can only partly corroborate).
InMemorySink
In-memory sink that collects every recorded StepFact.
JsonlFileSink
JSONL file sink with SHA-256 chain integrity.
LoadedTranscript
Verified transcript contents, chain-walked facts plus the final fingerprint and a flag for whether the run reached a terminal fact.
MaterialOverview
Overview of a declared material, carried by UiSignal::CeremonyOverview so the live UI can render the material list. In-flight only: the ceremony YAML is the source of truth for material metadata, so this never reaches the transcript.
OutputConfig
Configuration for ceremony output directory structure.
PromptId
Identifier that pairs a prompt request with its matching response.
Reporter
Action-facing handle threaded into every action handler.
StartupSnapshot
The one-shot UI snapshots emitted at ceremony start: static system identity and the initial device environment.
StepInfo
Information about a step needed by action handlers.
StepResult
Result of executing a step.
SystemClock
The real clock: reads the host wall clock via Utc::now. The default for every production run.
SystemInfo
Static build and host identity for the System tab and rite version --verbose.
SystemInfoParseError
Failure to parse one of this module’s string-backed enums.
TimedFact
A recorded fact paired with its envelope timestamp: the uniform event time, which lives on the chain envelope rather than on individual facts. Returned by read_verified_transcript so consumers read event time uniformly.
TranscriptFingerprint
SHA-256 fingerprint produced by a TranscriptSink::finalize call.
TranscriptVerified
Outcome of verifying a transcript on disk.

Enums§

ActionCategory
Category of an action, determines how the frontend presents it.
ActionError
Errors that may surface from an Action handler.
ArtifactValue
Runtime representation of an artifact.
ExecEvent
Event emitted by the runtime to the frontend.
ExecutionError
Errors during ceremony execution.
FeatureStatus
Status of a platform security feature.
Icon
Visual cue for UI lines. Mapped to a glyph by the frontend.
KeyFormat
Output format for public keys.
MaterialOverviewKind
Kind of material in MaterialOverview. Mirrors the structural distinction of the IR’s MaterialKind without the load-time implementation detail (file sources).
ReporterError
Errors that can arise while emitting events or awaiting a response.
Response
In-process user response.
UiCommand
Command sent by the frontend to the runtime.
UiSignal
Transient UI-only signal. Never written to the transcript.
VerifyError
Verification failure modes.

Constants§

DERIVATION_V1
Frozen-scheme tag recorded with the machine seed. It pins the entire construction (Extract/Expand, the ratchet rule, the info/path byte encodings), not merely the hash. A verifier treats it as a selector among known-good schemes it already trusts and rejects any value it does not recognise, it is never an instruction to trust an arbitrary algorithm.
MAX_DRAW_LEN
Longest value a single draw can produce: the HKDF-Expand output limit of 255 * HashLen bytes (RFC 5869), with SHA-256’s 32-byte output. [expand] panics beyond this, so anything replaying a recorded draw must bound the requested length by this value first.

Traits§

Action
Action trait, every ceremony step handler implements this.
Clock
Source of wall-clock time for a ceremony run.
TranscriptSink
Synchronous, durable observer of StepFacts.

Functions§

build_path
Build a derivation path. The single place the path format lives, so the draw side and the verify side cannot drift. A purpose is drawn at most once per step, so (epoch, step, purpose) uniquely identifies a value.
compute_file_fingerprint
SHA-256 fingerprint of a file’s contents.
compute_fingerprint
SHA-256 fingerprint of an in-memory byte slice.
derive_value
Derive the value at path from the given epoch seed.
evaluate
Evaluate an expression in the given context.
evaluate_expr_value
Evaluate an ExprValue to a JSON value.
evaluate_expr_value_to_string
Evaluate an ExprValue to a string.
fact_summary
One-line summary of a StepFact for live-frontend display.
fold_seed
Advance the ratchet by one epoch, folding in a human contribution.
initial_seed
Compute seed_0 from the machine entropy m.
parse_params
Deserialize the per-step parameter blob into a typed handler-specific struct.
read_verified_transcript
Verify a JSONL transcript and return its facts.
resolve_artifact_bytes
Resolve an artifact reference to byte content.
resolve_backend_key
Resolve an artifact to a backend-managed key reference.
signal_summary
One-line summary of a UiSignal for live-frontend display.
truncate_for_display
Truncate a string to at most max_chars Unicode scalar values, appending "..." when truncation occurs.
value_to_json
Convert a Value to a JSON value for action parameters.
verify_entropy
Re-derive a transcript’s entropy source and confirm every drawn value.
verify_step_fact_transcript
Verify a JSONL transcript file produced by JsonlFileSink.

Type Aliases§

BackendFactory
A closure that creates a concrete backend from its name and config.