# Example Plugin — 示例动态插件 演示如何使用 `showen-plugin-sdk` 编写动态插件。 ## 功能 - 仅打印日志,用于验证动态加载流程 - 展示 `ShowenPlugin` trait 的完整实现 - 编译为 `cdylib`(`.so` 文件) ## 编译 ```bash cd plugins/example-plugin cargo build --release ``` 产物: `target/release/libshowen_example_plugin.so` ## 安装 将 `.so` 和 `manifest.json` 放入 `plugin_store/example-plugin//` 目录即可被主程序动态加载。 ## 文件 | 文件 | 说明 | |------|------| | `src/lib.rs` | 插件实现,使用 `export_plugin!` 宏导出 | | `Cargo.toml` | crate 配置,类型为 cdylib |