Expand description
Runtime-facing StateVec host APIs and plugin contracts.
Domain plugins use this crate to implement RuntimePlugin and execute
deterministic transactions against a host-provided RuntimeHostContext.
Runtime hosts use the same traits and the exported plugin ABI to load domain
code across a process or dynamic-library boundary.
Modules§
- runtime_
error_ kind - Well-known runtime error kinds used by ABI helpers.
Structs§
- Command
- Runtime command value with kind, external sequence, external time, and payload.
- Committed
Receipt - Receipt returned when a command has a determined final outcome.
- Committed
Result Record - Fixed committed-result record.
- Exported
Runtime Plugin V1Handle - Boxed plugin handle owned across the ABI boundary.
- Queue
Receipt - Receipt returned when a command is accepted by the queue.
- Queue
Record - Minimal consumer-side contract for a single globally ordered queue.
- Record
Key - Fully qualified record key used by runtime hosts.
- Runtime
ApiProbe - Runtime
Bytes MutRef - Borrowed mutable byte slice passed across the C ABI.
- Runtime
Bytes Ref - Borrowed immutable byte slice passed across the C ABI.
- Runtime
Command Ref - Borrowed runtime command envelope.
- Runtime
Command View - ABI view of a command envelope.
- Runtime
Error Buf - Fixed-size ABI error buffer.
- Runtime
Error Kind - Stable numeric runtime error kind.
- Runtime
Host Context V1 - ABI handle for mutable runtime host access.
- Runtime
Host Context V1Adapter - Runtime
Host Error - Error returned by host context operations.
- Runtime
HostV Table V1 - Mutable host vtable exposed to runtime plugins.
- Runtime
Plugin ApiV1 - ABI function table returned by a runtime plugin entrypoint.
- Runtime
Plugin Error - Error returned by plugin transaction execution.
- Runtime
Plugin Load Error - Error returned while creating or loading a runtime plugin.
- Runtime
Plugin Unload Error - Error returned when unloading a runtime plugin.
- Runtime
Read Context V1 - ABI handle for read-only runtime host access.
- Runtime
Read Context V1Adapter - Runtime
ReadV Table V1 - Read-only host vtable exposed to invariant validation.
- Runtime
Record KeyView - ABI view of a record key.
- Submit
Request - Encoded submit request written to ingress queues.
Enums§
- Committed
Status - Determined command outcome.
- Queue
Codec Error - Error returned when queue codec records cannot be encoded or decoded.
- Rejected
Error Code - Domain/runtime rejection category encoded in committed result records.
- Runtime
Call Status - Status returned by FFI ABI calls.
- Runtime
Error Phase - Phase in which an ABI error occurred.
Constants§
- COMMITTED_
RESULT_ RECORD_ LEN - Total: version(1) + ext_seq(8) + status_tag(1) + status_value(8) = 18.
- COMMITTED_
RESULT_ RECORD_ VERSION - Version byte used by committed result queue records.
- RUNTIME_
PLUGIN_ ABI_ VERSION_ V1 - Current stable runtime plugin ABI version.
- RUNTIME_
PLUGIN_ ENTRY_ V1_ SYMBOL - Null-terminated symbol name exported by StateVec runtime plugins.
- STATEVEC_
API_ COMPAT_ VERSION - Numeric runtime plugin ABI compatibility version.
- STATEVEC_
API_ VERSION - Logical API compatibility version.
- SUBMIT_
REQUEST_ RECORD_ VERSION - Version byte used by submit request queue records.
Traits§
- BizInvariant
Read Context - Read-only state access surface for invariant validation.
- Committed
Result Query - Query surface for command outcomes keyed by queue sequence.
- Invariant
Read Context Ext - Typed convenience methods for
BizInvariantReadContext. - Queue
Consumer - Consumer-side contract for a single globally ordered queue.
- Queue
Consumer Resume - Resume metadata query for queue consumers.
- Queue
Producer - Minimal producer-side contract for a single globally ordered queue.
- Runtime
Command Envelope - Borrowed command envelope passed to runtime plugins.
- Runtime
Host Context - Object-safe host capability boundary used by runtime plugins.
- Runtime
Host Context Ext - Typed convenience methods layered on top of the raw
RuntimeHostContextcapability boundary. - Runtime
Plugin - Domain runtime plugin contract.
- Runtime
Plugin Factory - Factory used by a runtime host to create configured plugin instances.
- TxContext
- Full raw transaction context capability set.
- TxPk
Context - Primary-key lookup capability for raw transaction contexts.
- TxRead
Context - Read-only raw transaction capability used by typed convenience APIs.
- TxSys
IdCreate Context - Raw create capability that accepts a host-assigned system id.
- TxWrite
Context - Raw write capability for transaction contexts.
- Typed
TxContext - Typed transaction convenience API over generated StateVec accessors.
Functions§
- clear_
runtime_ error - Resets an optional ABI error buffer.
- decode_
committed_ result_ record - Decodes a committed-result record.
- decode_
submit_ request - Decodes a submit request queue record.
- encode_
committed_ result_ record - Encodes a committed-result record.
- encode_
committed_ result_ record_ fixed - Encodes a committed-result record into its fixed-width representation.
- encode_
submit_ request - Encodes a submit request queue record.
- runtime_
bytes_ ⚠slice - Converts an ABI byte reference into a Rust slice.
- runtime_
bytes_ ⚠slice_ mut - Converts an ABI mutable byte reference into a mutable Rust slice.
- runtime_
error_ message - Formats an ABI error buffer for diagnostics.
- runtime_
error_ text - Returns the error text from an ABI error buffer.
- runtime_
plugin_ ⚠create_ runtime_ v1 - Creates a runtime plugin instance through the v1 ABI helper.
- runtime_
plugin_ ⚠destroy_ runtime_ v1 - Destroys a runtime plugin instance created by
runtime_plugin_create_runtime_v1. - runtime_
plugin_ name_ v1 - ABI helper returning a plugin factory name.
- runtime_
plugin_ ⚠on_ unload_ v1 - Calls the plugin unload hook through the v1 ABI helper.
- runtime_
plugin_ ⚠run_ tx_ v1 - Runs one command transaction through the v1 ABI helper.
- runtime_
plugin_ schema_ bytes_ v1 - ABI helper returning cached schema IDL JSON bytes.
- runtime_
plugin_ ⚠validate_ biz_ invariants_ v1 - Validates plugin business invariants through the v1 ABI helper.
- write_
runtime_ error - Writes an error into an optional ABI error buffer.
Type Aliases§
- Runtime
Bytes MutVisitor - Visitor callback for uniquely borrowed mutable byte slices.
- Runtime
Bytes Visitor - Visitor callback for borrowed byte slices.
- Runtime
Plugin Entry V1 - Runtime plugin entrypoint function type.
- Runtime
Record KeyVisitor - Visitor callback for record keys.