Expand description
Plugin registry: the single source of truth for compiled .rhai
scripts after discovery. Owns the parsed ASTs + resolved header
data. Wrapping a CompiledPlugin in the Segment trait is the
RhaiSegment adapter’s job, not this module’s.
PluginRegistry::load walks the discovery order from
super::discovery::scan_plugin_dirs, compiles each script,
resolves its @data_deps header, and extracts the required
const ID declaration. Non-fatal errors (compile failure, unknown
dep, id collision) are returned alongside the registry so
linesmith doctor can surface them; a single bad plugin does not
abort the whole load.
Structs§
- Compiled
Plugin - A single compiled plugin ready to be wrapped by the
RhaiSegmentadapter. - Plugin
Registry - Keyed collection of compiled plugins. Lookup is by
id; iteration preserves discovery order. Non-fatal load errors (compile failure, unknown dep, id collision) live alongside the compiled plugins so post-load consumers (e.g.linesmith doctor) can query them at any point without re-running discovery.