plugrs-macros

Crates.ioplugrs-macros
lib.rsplugrs-macros
version0.1.1
created_at2025-01-15 06:14:05.625616+00
updated_at2025-01-15 06:17:57.394799+00
descriptionProcedural macros for the plugrs plugin system
homepage
repositoryhttps://github.com/Lydanne/plugrs
max_upload_size
id1517151
size4,625
Lyda (Lydanne)

documentation

https://docs.rs/plugrs-macros

README

plugrs-macros

Procedural macros for the plugrs system.

Features

  • #[plugin] macro for implementing plugin traits
  • Automatic plugin registration
  • Type-safe plugin interface generation

Usage

Add this to your Cargo.toml:

[dependencies]
plugrs-macros = "0.1.0"
plugrs-interface = "0.1.0"

Example

use plugrs_interface::Plugin;
use plugrs_macros::plugin;

#[plugin]
pub struct MyPlugin;

impl Plugin for MyPlugin {
    fn name(&self) -> String {
        "My Plugin".to_string()
    }

    fn execute(&self) -> i32 {
        42
    }
}

License

This project is licensed under the MIT License - see the LICENSE file for details.

Commit count: 28

cargo fmt