Skip to main content

Module adapter

Module adapter 

Source
Expand description

Adapters bridging Extism plugin exports to the uni_plugin capability traits.

For each crate::exports::RegistrationEntry kind, an adapter wraps the live extism::Plugin in the trait object the executor expects (ScalarPluginFn, AggregatePluginFn, …). The adapter handles:

  1. Marshalling &[ColumnarValue] into an Arrow RecordBatch.
  2. Encoding the batch as Arrow IPC stream bytes.
  3. Calling the plugin’s invoke_<qname> export under the plugin mutex.
  4. Decoding the returned IPC bytes back into a RecordBatch and extracting the single output column as a ColumnarValue.

Per proposal §5.6.1, Arrow IPC over linear memory keeps the columnar contract uniform across Extism and the Component Model. The executor cannot tell which ABI delivered a batch — only the adapter does.

Structs§

ExtismScalarFn
ScalarPluginFn adapter wrapping an Extism plugin pool.