1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2026 ReifyDB
//! 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.