| Crates.io | rmqtt-macros |
| lib.rs | rmqtt-macros |
| version | 0.1.1 |
| created_at | 2025-04-17 14:53:22.960726+00 |
| updated_at | 2025-04-19 10:03:51.453288+00 |
| description | Procedural Macro Utilities |
| homepage | |
| repository | https://github.com/rmqtt/rmqtt.git |
| max_upload_size | |
| id | 1637942 |
| size | 12,785 |
✨ rmqtt-macros provides a collection of procedural macros to enhance the RMQTT ecosystem, including support for metrics collection and plugin systems. All macros are gated by feature flags for modular usage.
metrics – Enables the #[derive(Metrics)] macro for auto-generating metric collectorsplugin – Enables the #[derive(Plugin)] macro for building dynamic plugin systems#[cfg(feature = "metrics")]
#[derive(Metrics)]
struct NetworkMetrics {
bytes_sent: Counter,
bytes_received: Counter,
}
#[cfg(feature = "plugin")]
#[derive(Plugin)]
struct MyPlugin {
config: PluginConfig,
}
To use a specific macro, enable the corresponding feature in your Cargo.toml:
[dependencies]
rmqtt-macros = { version = "0.1", features = ["metrics", "plugin"] }
This crate is intended for internal use within the RMQTT project but can be reused in other systems requiring similar functionality.