Expand description
§Ryo Plugin Runtime
WASM plugin runtime for ryo mutations. Provides registry management and execution of WASM-based mutation plugins.
§Architecture
ryo-plugin-api - WIT interface definitions
ryo-plugin-loader - WASM loading (PluginLoader, LoadedPlugin)
ryo-plugin-runtime - Registry + Executor (this crate)§Usage
ⓘ
use ryo_plugin_runtime::{MutationRegistry, PluginExecutor};
let mut registry = MutationRegistry::new()?;
registry.load_plugins_from_dir("~/.ryo/plugins")?;
let mut executor = PluginExecutor::new(&mut registry);
let result = executor.execute("bool-simplify", Path::new("src/lib.rs"), source)?;Structs§
- Capture
- Captured node from pattern match
- Loaded
Plugin - A loaded mutation plugin with live WASM instance
- Match
Result - Pattern match result
- Mutation
Manifest - Mutation manifest - returned once at plugin load
- Mutation
Registry - Registry of all available mutations (builtin + plugins)
- Plugin
Execution Result - Result of executing a plugin on a source file
- Plugin
Executor - Execute WASM plugins against source code
- Plugin
Info - Information about a loaded plugin
- Plugin
Loader - WASM Plugin Loader
- Text
Edit - Text edit operation (atomic change)
- Transform
Context - Transform execution context (passed to execute-transform)
- Type
Hint - Type information hint (from syn analysis)
Enums§
- Loader
Error - Error type for plugin loading and execution
- Mutation
Category - Mutation category
- Node
Kind - AST node kinds (Rust-specific)
- Plugin
Executor Error - Error type for plugin execution
- Registry
Error - Error type for registry operations
- Transform
Def - Transform definition
- Transform
Error - Transform error variants
Constants§
- CURRENT_
API_ VERSION - Current API version