Plugin SDK
Write sova-* plugins against sova_core::extend and the Plugin trait. App users: use the Plugins catalog and Concepts (core API: streaming, upgrades, events, limits, …).
How pages are built: guides in plugin-sdk-guides → sova-docs-gen → docs/api/plugin-sdk*.
Pages
| Page | Summary |
|---|---|
Overview | Mental model, import surfaces, and install checklist for plugin authors. |
Plugin trait | id, meta, requires, install, closure plugins, and SDK versioning. |
Middleware | named, with_leaked, with_state, MwEntry — when to use each. |
State & dependencies | app.state, markers, Needs, hard requires vs soft has_plugin / try_state. |
Config | Toml unset-fill, env precedence, parse_duration / parse_bytes, features. |
Lifecycle & services | on_startup / on_shutdown, pool pattern, BackgroundService, CLI mode. |
Checks & CLI | register_check vs register_audit, probes, register_cli commands. |
Routes & introspection | Plugin routes, path helpers, RouteValue / MetaMap, match captures. |
Extractors & Problem+ | Path/Json/State handlers, EventBus, API problem+json errors. |
Events | EventBus listen/dispatch + catalog of first-party plugin events. |
HTML & log hooks | HTML inject, logger_skip_path, add_log_event_hook for DevTools-style sinks. |
Errors | Startup Err vs panic, ErrorResponse, soft degradation. |
Recipes | Patterns copied from in-tree plugins (cookies→csrf, pools, tasks, store). |
extend API | Symbol table for sova_core::extend — what it is and who uses it. |
Testing | In-process TestClient, ResponseAssert, TestApp/sqlite, cookies, auth hooks, real examples. |
Quick links
- Start: Overview · Plugin trait
- Cookbook: Middleware · State · Recipes
- Reference: extend API · Testing
- Scaffold:
cargo sovax generate plugin <name>
