uni_plugin_wasm/bindings.rs
1//! wasmtime-generated bindings for the `uni:plugin` WIT worlds.
2//!
3//! `wasmtime::component::bindgen!` walks the `wit/` directory at
4//! compile time and emits typed wrappers for each `world`. The
5//! generated types live in submodules named after the world.
6//!
7//! Downstream adapters import e.g.
8//! `crate::bindings::scalar_plugin::ScalarPlugin` to get the typed
9//! `invoke_scalar(qname, ipc) -> Result<Vec<u8>, FnError>` wrapper.
10
11#![allow(missing_docs)]
12#![allow(missing_debug_implementations)]
13#![allow(clippy::all)]
14
15/// Scalar plugin world. Implements one or more Cypher scalar fns
16/// over the Arrow IPC bytes wire format.
17pub mod scalar {
18 wasmtime::component::bindgen!({
19 world: "scalar-plugin",
20 path: "wit",
21 });
22}
23
24/// Aggregate plugin world. Implements Cypher aggregates with opaque
25/// state passed between calls.
26pub mod aggregate {
27 wasmtime::component::bindgen!({
28 world: "aggregate-plugin",
29 path: "wit",
30 });
31}
32
33/// Procedure plugin world. Implements `CALL ... YIELD ...`
34/// procedures returning zero or more `yields`-shaped batches.
35pub mod procedure {
36 wasmtime::component::bindgen!({
37 world: "procedure-plugin",
38 path: "wit",
39 });
40}