Skip to main content

ryo_plugin_runtime/
lib.rs

1//! # Ryo Plugin Runtime
2//!
3//! WASM plugin runtime for ryo mutations.
4//! Provides registry management and execution of WASM-based mutation plugins.
5//!
6//! ## Architecture
7//!
8//! ```text
9//! ryo-plugin-api      - WIT interface definitions
10//! ryo-plugin-loader   - WASM loading (PluginLoader, LoadedPlugin)
11//! ryo-plugin-runtime  - Registry + Executor (this crate)
12//! ```
13//!
14//! ## Usage
15//!
16//! ```ignore
17//! use ryo_plugin_runtime::{MutationRegistry, PluginExecutor};
18//!
19//! let mut registry = MutationRegistry::new()?;
20//! registry.load_plugins_from_dir("~/.ryo/plugins")?;
21//!
22//! let mut executor = PluginExecutor::new(&mut registry);
23//! let result = executor.execute("bool-simplify", Path::new("src/lib.rs"), source)?;
24//! ```
25
26mod executor;
27mod registry;
28
29pub use executor::*;
30pub use registry::*;
31
32// Re-export commonly used types from ryo-plugin-loader
33pub use ryo_plugin_loader::{
34    Capture, LoadedPlugin, LoaderError, MatchResult, MutationCategory, MutationManifest, NodeKind,
35    PluginLoader, TextEdit, TransformContext, TransformDef, TransformError, TypeHint,
36    CURRENT_API_VERSION,
37};