Skip to main content

Crate mesh_native_serving_plugin_api

Crate mesh_native_serving_plugin_api 

Source
Expand description

Stable native plugin boundary for Mesh’s local Skippy serving path.

The ABI is deliberately smaller than Mesh’s Rust crate graph. Plugins are independently compiled dynamic libraries, so only fixed-layout values, opaque handles, borrowed byte/token slices, and host-owned output buffers cross the boundary. Rust collections, trait objects, futures, and allocator ownership never do.

Every function in the table must be thread-safe and return promptly. In particular, proposal submission and polling must never wait for proposer work. Mesh invokes proposal functions on an isolated host worker and owns the absolute decode deadline; a plugin that violates this contract can strand only that worker, never the model decode thread.

Structs§

ActivationContext
ByteSlice
GenerationAbort
GenerationCommit
GenerationFinish
GenerationStart
GenerationTermination
NativeServingPluginV1
PluginActivation
PluginStatus
ProposalDiscard
ProposalDiscardReason
ProposalDisposition
ProposalOutcome
ProposalOutput
ProposalPollStatus
ProposalQuery
TokenSlice
TokenizerInventory
Host-owned typed inventory. This Rust value never crosses the ABI directly.
TokenizerInventoryEntry
Borrowed ABI view of one immutable native token. The referenced bytes are valid only for the duration of activate; a plugin must copy or transform them before it returns.
TokenizerInventoryToken
TokenizerInventoryView
Borrowed ABI view of the complete vocabulary. The host owns the entries and their bytes and passes them only while activating the plugin.
TokenizerPieceKind
U64Slice

Enums§

TokenizerInventoryPiece

Constants§

MAX_DECISION_ID_BYTES
NATIVE_SERVING_PLUGIN_ABI_V1
NATIVE_SERVING_PLUGIN_ENTRY_V1
TOKENIZER_INVENTORY_SCHEMA

Type Aliases§

AbortGeneration
ActivatePlugin
BeginGeneration
CancelProposal
CommitGeneration
DiscardProposal
FinishGeneration
LastError
MonotonicNowNs
NativeServingPluginEntryV1
PluginInstance
PollProposal
ProposalOperation
ReportProposal
ShutdownPlugin
StartProposal