razeri-plugin-api
Extension traits and registries for building Razeri plugins.
This is the single crate third-party authors depend on to extend Razeri with new database dialects, storage backends, LLM providers, AI model adapters, language renderers, and event sinks.
Extension Points
| Trait | Registry | Purpose |
|---|---|---|
PlatformDialect |
PlatformRegistry |
SQL dialect for a new database |
StorageProviderFactory |
StorageRegistry |
Storage backend (S3, Azure, etc.) |
LlmClientFactory |
LlmRegistry |
LLM provider (Ollama, OpenAI, etc.) |
LlmModelAdapter |
ModelRegistry |
Model capabilities and routing |
LanguageRendererFactory |
LanguageRegistry |
Code generation target language |
EventSink |
EventRegistry |
Structured telemetry sink |
The rendering traits themselves live in
razeri-plugin-contract,
which this crate depends on and re-exports as razeri_plugin_api::razeri_plugin_contract.
Quick Start
use Arc;
use DialectRegistration;
use ;
use ;
;
// SqlRenderer: 4 required methods; everything else defaults to ANSI behaviour.
// Remaining traits: all methods have defaults — each override is a decision
// your engine states about itself.
// Auto-register at link time
submit!
Proving a plugin
The conformance kit runs from your own test suite and grades the plugin the way Razeri grades its shipped dialects — defaulted decisions, contradictory capability answers, missing refusal wording:
let report = check;
assert!;
Your dialect's names are yours: name is the one Razeri reports, aliases is
every other spelling a design may use for the same platform, and the resolver
reads both off the dialects that are loaded. A clean report never depends on
anything inside Razeri — only on not claiming a spelling another loaded platform
already answers to.
Features
dynamic(default) — Enables runtime plugin loading via shared libraries (libloading).
Documentation
License
Dual-licensed under MIT or Apache 2.0, at
your option — this crate is the open surface of an otherwise proprietary
workspace, so plugin authors depend on it freely. The rest of the
Razeri repository is covered by its root
LICENSE (see its §4, "Plugins are open").