Skip to main content

Module canonical_kernel

Module canonical_kernel 

Source
Expand description

Typed Rust surface for the Canonical Kernel ABI.

This module deliberately re-exports the core-owned wire values instead of wrapping them in SDK JSON DTOs. Rust callers therefore prepare a typed WireEnvelope, receive the closed CanonicalPreparation enum, persist KernelRecord::record_bytes, and commit with the digest core produced. There is no production direct-step method.

Structs§

CanonicalKernel
One canonical operation driven exclusively through the durable transition protocol.
CheckpointAdvice
The soft-watermark crossing of §12.3, with the numbers that justify it.
CheckpointBoundary
The prefix a checkpoint would cover (§12.3).
ConfigDefaults
The kernel’s compile-time baseline plus the bootstrap ceiling to resolve against.
Digest
Content digest of a payload or record. Algorithm-prefixed (sha256:…) so a future algorithm change is visible on the wire rather than silently reinterpreted.
DurableHead
The journal head this runtime believes in: the CAS precondition of the next append.
EffectsDisposition
InputId
Caller-suppliable idempotency key for one envelope (DEC-2). Retrying the same intent with the same input_id must reach the same durable record.
KernelEffect
One action the kernel published and is now waiting on.
KernelFault
A structured rejection. Malformed JSON, unknown fields/variants and revision mismatches all arrive here too — the same shape in all four languages, rather than one language’s exception.
KernelRecord
One durable transition (§8.1).
OperationId
Identity of one kernel operation. Minted once, immutable after the first accepted input.
PlannedStep
One planned transition, as the canonical driver produces it.
PrepareToken
Handle for a prepared-but-uncommitted transition. Handed out only by KernelPreparation::Prepared: a replay has nothing to commit and a rejection has nothing to abort.
RestoreCost
What a restore actually read.
TailUsage
How much tail the operation is carrying since its last acked checkpoint.
TerminalDisposition
WireEnvelope
The one shape a host may hand the kernel (spec §7.1 calls it KernelEnvelope).
WireU64
A logical u64 that travels as a canonical decimal string.

Enums§

EffectKind
The closed set of actions a host must execute and report back.
KernelFaultCode
Why the kernel refused an input.
KernelInput
The closed five-class input taxonomy (§7.2).
KernelPreparation
The result of preparing one input.
KernelTerminal
How an operation ended.
OperationLifecycle
Operation lifecycle (§6), owned directly by the canonical wire contract.
StepDisposition
What a single committed step publishes.

Functions§

canonical_digest
SHA-256 over exactly these bytes, projected as sha256:<64 lowercase hex digits>.

Type Aliases§

CanonicalCheckpoint
CanonicalCheckpointCandidate
CanonicalCommit
CanonicalPreparation