plugy is a plugin system designed to enable the seamless integration of Rust-based plugins into your application. It provides a runtime environment for loading and executing plugins written in WebAssembly (Wasm), enabling dynamic extensibility and modularity in your Rust projects.
To use plugy in your Rust project, follow these steps:
```rust
trait Greeter { fn greet(&self) -> String; } ```
```rust
struct FooPlugin;
impl Greeter for FooPlugin { fn greet(&self) -> String { "Hello From Foo Plugin".to_owned() } } ```
Compile it!
cargo build --target wasm32-unknown-unknown
```rust
struct FooPlugin;
async fn main() {
let runtime = Runtime::
And you are set!
Check out the examples directory for sample usage of plugy.
Contributions to plugy are welcome! If you find a bug or want to propose a new feature, feel free to create an issue or submit a pull request.
License
This project is licensed under the GNU General Public License.