Expand description
§Ryo Plugin Loader
WASM plugin loader for ryo mutation plugins.
This crate provides the PluginLoader which loads WASM mutation plugins
and provides an interface to call their exported functions.
§Architecture
ryo-plugin-loader ryo-executor
┌───────────────────────┐ ┌─────────────────────────┐
│ PluginLoader │ │ MutationRegistry │
│ ├─ load(bytes) │──────────│ ├─ register_plugin() │
│ └─ LoadedPlugin │ │ └─ Apply mutations │
└───────────────────────┘ └─────────────────────────┘§Usage
ⓘ
use ryo_plugin_loader::PluginLoader;
let loader = PluginLoader::new()?;
let mut plugin = loader.load(&wasm_bytes)?;
println!("Loaded mutation: {}", plugin.manifest.name);
// For complex transforms (TransformDef::WasmExecute)
let edits = plugin.execute_transform(matches, context)?;§Security
- Fuel limits prevent infinite loops (10M instructions for init, 1M per transform)
- Stack size limits prevent stack overflow (1MB)
- WASI sandbox restricts filesystem/network access
Modules§
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
Plugin - Auto-generated bindings for an instance a component which
implements the world
mutation-plugin. - Mutation
Plugin Indices - Auto-generated bindings for index of the exports of
mutation-plugin. - Mutation
Plugin Pre - Auto-generated bindings for a pre-instantiated version of a
component which implements the world
mutation-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)
- Transform
Def - Transform definition
- Transform
Error - Transform error variants
Constants§
- CURRENT_
API_ VERSION - Current API version