Skip to main content

Crate reifydb_sdk

Crate reifydb_sdk 

Source
Expand description

Surface that external code uses to extend ReifyDB - building operators, procedures, transforms, flows, and custom connectors that plug into the engine. The crate exposes the FFI boundary that out-of-process extensions implement, the marshalling for values that cross that boundary, and a testing harness so an extension author can run their code against an in-process engine without a server.

The shapes of catalog objects, RQL fragments, and result rows that an extension sees here are stable contracts: the SDK is what insulates third-party code from internal refactors of the engine, the planner, or the storage tier. Anything that crosses this boundary - identifiers, errors, columnar payloads - has a versioned representation, and widening that representation requires a coordinated bump on both sides.

Invariant: the FFI layer does not leak engine-internal types; everything an extension sees comes either from reifydb-value or from this crate’s own re-exports. Reaching for an internal engine type from inside an SDK module ties extension ABI to engine refactors.

Modules§

catalog
config
connector
Source and sink connectors that move data between flows and the outside world. A source produces rows from an external system into a flow; a sink consumes rows from a flow and pushes them somewhere external. Both share the same authoring shape so an extension implements either side - or both - against a single set of primitives.
error
ffi
Guest-side FFI: the symbols a built-as-cdylib extension exports so the host can find and call into it. The arena owns memory the extension hands back across the boundary; the exports module declares the C-callable entry points; the wrappers turn the resulting C ABI into the typed Rust surface the rest of sdk/ exposes.
flow
Flow definition surface. SDK consumers describe a streaming computation here as a graph of operators, connectors, and inputs; the resulting structure is what the engine compiles into the dataflow that sub-flow runs. The builder hides the catalog plumbing so an extension author does not have to know how flows are persisted.
marshal
operator
Operator authoring surface for SDK consumers. An operator is a node in a flow graph that takes a set of input columns, transforms them, and produces output columns; this module exposes the builder, the column and row views, the diff representation an operator emits, and the context that gives the operator access to engine services. Anything an extension needs to write a useful operator lives here.
procedure
rql
state
store
testing
transform

Macros§

row