# ryo-plugin-runtime
[](https://crates.io/crates/ryo-plugin-runtime)
[](https://docs.rs/ryo-plugin-runtime)
[](#license)
> **Status:** experimental. APIs may change in v0.x.
> Part of the [ryo](https://github.com/ynishi/ryo-rs) workspace —
> AST-centric Rust programming for AI agents.
WASM plugin runtime — registry management and execution. Sits on top of
[`ryo-plugin-loader`](https://crates.io/crates/ryo-plugin-loader) and exposes
a `MutationRegistry` that can scan a directory of `.wasm` plugins and a
`PluginExecutor` that drives them against source files.
```text
ryo-plugin-api — WIT interface definitions
ryo-plugin-loader — WASM loading (PluginLoader, LoadedPlugin)
ryo-plugin-runtime — Registry + Executor (this crate)
```
## Install
```sh
cargo add ryo-plugin-runtime
```
## Quickstart
```rust,ignore
use ryo_plugin_runtime::{MutationRegistry, PluginExecutor};
use std::path::Path;
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)?;
```
## API Summary
| `MutationRegistry` | Scan a directory, register loaded plugins |
| `PluginExecutor` | Run a registered plugin against source |
Plugin-API types (`MutationManifest`, `MatchResult`, `TextEdit`, …) and
`PluginLoader` / `LoadedPlugin` are re-exported from `ryo-plugin-loader`.
## Status
**Experimental.** Plugin lifecycle, discovery, and execution APIs are
still being shaped.
## License
Licensed under either of [Apache-2.0](https://github.com/ynishi/ryo-rs/blob/main/LICENSE-APACHE)
or [MIT](https://github.com/ynishi/ryo-rs/blob/main/LICENSE-MIT) at your option.