Plugin framework for uni-db.
uni-plugin defines the trait surface, registry, manifest, and capability
model that every uni-db extension — scalar function, aggregate, procedure,
storage backend, index kind, graph algorithm, CRDT, hook, trigger, background
job, logical type, auth provider, authz policy, connector, collation, CDC
output, catalog, replacement scan, Pregel program — registers through.
The crate intentionally has no host integration: it does not depend on
uni-query, uni-store, uni-crdt, uni-algo, or uni. Those crates
depend on uni-plugin and adapt their existing surfaces to the traits
defined here. This direction keeps the dependency graph acyclic and lets
the trait surface be reviewed in isolation.
Layout
- [
plugin] — thePlugintrait,PluginManifest,PluginHandle. - [
qname] — qualified plugin-function names (namespace.local). - [
capability] —Capability,CapabilitySet,Determinism,Scope. - [
manifest] — TOML / JSON manifest (de)serialization. - [
registrar] — the builder a plugin'sregister()method calls. - [
registry] — per-surface trait-object tables (arc-swap-backed for wait-free reads). - [
traits] — one module per extension surface (scalar functions, aggregates, procedures, hooks, …). - [
errors] —PluginError,FnError, plus per-trait error helpers.
Stability
Until uni-plugin reaches 1.0.0, trait shapes may change.
The semver guarantees apply only to 0.x major versions in the meantime.
Examples
use ;
;