# plugin-interface **Repository Path**: loyoi/plugin-interface ## Basic Information - **Project Name**: plugin-interface - **Description**: 插件实例的通用库 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-11-12 - **Last Updated**: 2025-04-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # plugin-interface #### 介绍 插件实例的通用库 #### 软件架构 软件架构说明 #### 使用说明 ```toml [dependencies] plugin-interface = { git="https://gitee.com/loyoi/plugin-interface" } ``` ```Rust use plugin_interface::Plugin; #[no_mangle] pub extern "Rust" fn new_plugin() -> Box { Box::new(MyPlugin::new()) } pub struct MyPlugin; impl MyPlugin { pub fn new() -> Self { MyPlugin } } impl Plugin for MyPlugin { fn run(&self, input: &str) { println!("Running with input: {}", input); } fn initialize(&self) { println!("Initializing plugin..."); } fn shutdown(&self) { println!("Shutting down plugin..."); } } ```