Skip to main content

linesmith_core/plugins/
mod.rs

1//! Rhai plugin runtime for user-authored segments.
2//!
3//! Plugins are `.rhai` files discovered at startup (per
4//! `docs/specs/plugin-api.md`), compiled once, wrapped in a
5//! `RhaiSegment` adapter, and registered alongside built-ins. This
6//! module root re-exports [`build_engine`](engine::build_engine) —
7//! the constructor for the shared `Arc<Engine>` every plugin invokes
8//! `call_fn` on — and [`PluginError`](errors::PluginError), the
9//! load-time + render-time failure surface.
10
11pub mod ctx_mirror;
12pub mod discovery;
13pub mod engine;
14pub mod errors;
15pub mod header;
16pub mod output;
17pub mod registry;
18pub mod segment;
19
20pub use ctx_mirror::build_ctx;
21pub use discovery::scan_plugin_dirs;
22pub use engine::build_engine;
23pub use errors::{CollisionWinner, PluginError, ResourceLimit};
24pub use header::{parse_data_deps_header, HeaderError};
25pub use output::validate_return;
26pub use registry::{CompiledPlugin, PluginRegistry};
27pub use segment::RhaiSegment;