Expand description
Rustev’s runtime (spec 003).
Drives the pure core’s staged evaluation through DecisionBackends
under explicit bounds: a monotonic Clock and one end-to-end deadline,
bounded admission and concurrency, cost Ledgers that reserve before
dispatch, retries and fallback only as the plan’s execution policy
declares them, cancellation that records exactly what the backend
acknowledged, and a run record delivered under a SinkPolicy.
The runtime spawns no task per decision, request or attempt: a decision runs on the caller’s task. The one spawned task is the delivery worker of the queued sink policies (spec 003, 3.4.3).
Re-exports§
pub use clock::Clock;pub use clock::Instant;pub use clock::ManualClock;pub use clock::TokioClock;pub use ledger::Ledger;
Modules§
- clock
- The runtime’s only source of elapsed time (spec 003, 3.3.1): a monotonic millisecond counter. Domain evaluation time is never read here; the caller supplies it with each decision.
- ledger
- Cost ledgers (spec 003, 3.5). A ledger reserves before dispatch, under a lock, so concurrent attempts cannot together reserve past its limit; it settles each reservation against the charge the adapter reported, and keeps a reservation as liability whenever the final cost is unknown.
Structs§
- Capture
Config - What to capture under. The scope is the host’s isolation choice for retained evidence; it is separate from, and never changes, the principal handle passed to backends.
- Captured
Decision - The normal decide result, and beside it the capture, also when evidence delivery failed.
- Decided
- Decision
Request - One decision to run.
- Delivery
Failure - Why a delivery did not produce a receipt.
- Delivery
Ticket - Resolves when the worker has delivered, or failed to deliver, a queued record.
- Dynamic
Asked - Dynamic questions (spec 019): the only execution entry point.
Dynamic questions (spec 019): the only execution entry point.
Dynamic questions (spec 019): the only execution entry point.
What
ask_dynamicreturns: the outcome, and beside it its delivery. - Dynamic
Bounds - Dynamic questions (spec 019): the only execution entry point. Dynamic questions (spec 019): the only execution entry point. Dynamic questions (spec 019): the only execution entry point. The bounds of one dynamic request, fresh for each call.
- Gauges
- Live counts, for operators and tests. In memory only.
- Invalidation
Result - Live
Request - One live re-execution to run. Nothing here is taken from a replay bundle.
- Live
Result - A finished live re-execution: the ordinary result of a new decision and its live document, returned also when evidence delivery failed, so every attempt, charge and remote state stays with the caller (spec 026, 5).
- Prepared
Plan - A compiled plan checked against this runtime’s backends.
- Runtime
- Runtime
Builder - Runtime
Config - Bounds of one runtime (spec 003, 3.4).
- Sink
Stats - A snapshot of the delivery counters.
- Step
Progress - A recorded result, without value bytes or authorization semantics.
Enums§
- Capture
Config Error - A capture configuration refused before admission.
- Capture
Outcome - What
Runtime::decide_with_capturecaptured (spec 004, 5.3). - Completion
- Config
Error - Decide
Error - Delivery
- Dispatch
Answer - The host’s answer about one proposed attempt. In process only: it is neither serializable nor clonable, the runtime keeps nothing of it but the reference, and it authorizes no action outside that one dispatch.
- Dynamic
Delivery - Dynamic questions (spec 019): the only execution entry point. Dynamic questions (spec 019): the only execution entry point. Dynamic questions (spec 019): the only execution entry point. Whether the outcome reached the sink. A failed delivery never changes the outcome.
- Live
Refusal - Why a live re-execution was refused before admission. Nothing was presented to the authorizer, dispatched or spent.
- Prepare
Error - Why a plan cannot run on this runtime (spec 003, 3.5.3 and 3.6.5).
- Rejection
- Why a decision was not admitted (spec 003, 3.4.1). Nothing was dispatched or spent, and there is no run record.
- Sink
Policy - How evidence reaches the sink, and what the caller receives.
Constants§
- MAX_
CAPTURE_ BYTES - The largest byte limit a capture may be configured with.
Traits§
- Live
Authorizer - The host’s authorization seam (spec 026, 3.3). Rustev mints no token:
the host decides, from its own trusted facts, whether this exact attempt
may be sent.
Ok(None)is no answer (missing);Erris a failure of the authorizer (errored); a panic is contained and errored. Every one of them prevents dispatch. - Progress
Observer - Synchronous, non-blocking callbacks. Implementations must perform no I/O, acquire no contended locks, and never wait for a consumer. Panics are counted and contained by the runtime. Observation cannot alter evidence.
Functions§
- ask_
dynamic - Dynamic questions (spec 019): the only execution entry point.
Dynamic questions (spec 019): the only execution entry point.
Dynamic questions (spec 019): the only execution entry point.
Ask one dynamic question (spec 019, 3.1):
questionwas validated against the host’s allowlist,backendis the host’s choice,cxcarries the non-secret trace id and principal handle (its remaining time is set here), andcancelis the caller’s cancellation.