ewwii_plugin_api

Crates.ioewwii_plugin_api
lib.rsewwii_plugin_api
version0.7.0
created_at2025-10-08 14:46:04.344309+00
updated_at2025-11-22 06:39:04.551201+00
descriptionA shared library for building plugins for ewwii
homepagehttps://github.com/byson94/ewwii
repositoryhttps://github.com/byson94/ewwii
max_upload_size
id1874064
size35,505
Byson94 (Byson94)

documentation

README

ewwii_plugin_api

A shared interface providing traits for building plugins for ewwii.

Example

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);
Commit count: 0

cargo fmt