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§
- Canonical
Kernel - One canonical operation driven exclusively through the durable transition protocol.
- Checkpoint
Advice - The soft-watermark crossing of §12.3, with the numbers that justify it.
- Checkpoint
Boundary - The prefix a checkpoint would cover (§12.3).
- Config
Defaults - 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. - Durable
Head - The journal head this runtime believes in: the CAS precondition of the next append.
- Effects
Disposition - InputId
- Caller-suppliable idempotency key for one envelope (DEC-2). Retrying the same intent with
the same
input_idmust reach the same durable record. - Kernel
Effect - One action the kernel published and is now waiting on.
- Kernel
Fault - 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.
- Kernel
Record - One durable transition (§8.1).
- Operation
Id - Identity of one kernel operation. Minted once, immutable after the first accepted input.
- Planned
Step - One planned transition, as the canonical driver produces it.
- Prepare
Token - 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. - Restore
Cost - What a restore actually read.
- Tail
Usage - How much tail the operation is carrying since its last acked checkpoint.
- Terminal
Disposition - Wire
Envelope - The one shape a host may hand the kernel (spec §7.1 calls it
KernelEnvelope). - WireU64
- A logical
u64that travels as a canonical decimal string.
Enums§
- Effect
Kind - The closed set of actions a host must execute and report back.
- Kernel
Fault Code - Why the kernel refused an input.
- Kernel
Input - The closed five-class input taxonomy (§7.2).
- Kernel
Preparation - The result of preparing one input.
- Kernel
Terminal - How an operation ended.
- Operation
Lifecycle - Operation lifecycle (§6), owned directly by the canonical wire contract.
- Step
Disposition - What a single committed step publishes.
Functions§
- canonical_
digest - SHA-256 over exactly these bytes, projected as
sha256:<64 lowercase hex digits>.