Expand description
Shared runtime helpers for the uni-db WASM plugin loaders.
uni-plugin-wasm-rt is the M6.shared lift — a crate that sits below
both uni-plugin-extism and uni-plugin-wasm in the dependency
graph and owns the two pieces of machinery they would otherwise
duplicate:
- Arrow IPC bridge (
ipc) —RecordBatch↔ stream bytes, shared between Extism’s bytes-in/bytes-out boundary and the Component Model’s linear-memory boundary. - Pre-warmed instance pool (
pool) — generic over the pooled instance type and the loader’s error type. Both loaders alias this with their concreteTand error.
Neither piece depends on extism or wasmtime; both depend only on
arrow-ipc, crossbeam-queue, and parking_lot. That keeps the
crate small and lets it stay below uni-plugin in the workspace
dep graph, so the trait-only embedder pays nothing for plumbing
they never invoke.
Modules§
- error
- Shared error type for the wasm-rt IPC bridge.
- ipc
- Arrow IPC bridge —
RecordBatch↔ wire-stream bytes. - pool
- Generic pre-warmed instance pool for wasm-backed plugins.
Structs§
- Instance
Pool - A pool of pre-warmed instances for one plugin.
- Pool
Config - Per-pool configuration.
- Pool
Metrics - Pool metrics surface — read by
host.metric_counterhost imports. - Pooled
Instance - RAII wrapper acquired from an
InstancePool: holds the instance and returns it to the pool on drop.
Enums§
- IpcError
- Errors raised by the Arrow IPC bridge.
Functions§
- decode_
batch - Decode the single
RecordBatchfrom Arrow IPC stream bytes. - decode_
batches - Decode every
RecordBatchfrom Arrow IPC stream bytes. - encode_
batch - Encode a
RecordBatchas Arrow IPC stream bytes. - encode_
batches - Encode multiple
RecordBatches sharing a schema as one IPC stream.