| Crates.io | ewwii_plugin_api |
| lib.rs | ewwii_plugin_api |
| version | 0.7.0 |
| created_at | 2025-10-08 14:46:04.344309+00 |
| updated_at | 2025-11-22 06:39:04.551201+00 |
| description | A shared library for building plugins for ewwii |
| homepage | https://github.com/byson94/ewwii |
| repository | https://github.com/byson94/ewwii |
| max_upload_size | |
| id | 1874064 |
| size | 35,505 |
A shared interface providing traits for building plugins for ewwii.
A simple example showing how to use this interface is provided below:
use ewwii_plugin_api::{EwwiiAPI, Plugin, export_plugin};
pub struct DummyStructure;
impl Plugin for DummyStructure {
// critical for ewwii to launch the plugin
fn init(&self, host: &dyn EwwiiAPI) {
// will be printed by the host
host.log("Plugin says Hello!");
host.rhai_engine_action(Box::new(|engine| {
let ast = engine.compile("1+1");
println!("Compiled AST: {:#?}", ast);
}));
}
}
// Critical for ewwii to see the plugin
export_plugin!(DummyStructure);