| Crates.io | srad |
| lib.rs | srad |
| version | 0.3.0 |
| created_at | 2025-03-06 22:06:50.379254+00 |
| updated_at | 2025-07-22 20:46:44.905803+00 |
| description | Sparkplug development framework |
| homepage | https://github.com/dpazj/srad |
| repository | https://github.com/dpazj/srad |
| max_upload_size | |
| id | 1581904 |
| size | 30,813 |
srad is a Sparkplug library and development framework in Rust.
Additional information for this crate can be found in the docs.
srad aims to make it easy as possible to build reliable, fast, and resource efficient Sparkplug B Edge Nodes and Applications with minimal overhead.
Features include:
tokio, providing out-the-box compatibility, scalable implementations, and support for Node/Application specific featuresuse srad::{client_rumqtt, eon::{EoN, EoNBuilder, NoMetricManager}};
#[tokio::main]
async fn main() {
let opts = client_rumqtt::MqttOptions::new("foo:bar", "localhost", 1883);
let (eventloop, client) = client_rumqtt::EventLoop::new(opts, 0);
let (mut eon, handle) = EoNBuilder::new(eventloop, client)
.with_group_id("foo")
.with_node_id("bar")
.with_metric_manager(NoMetricManager::new())
.build().unwrap();
eon.run().await;
}
use srad::app::{SubscriptionConfig, generic_app::ApplicationBuilder};
use srad::client_rumqtt;
#[tokio::main]
async fn main() {
let opts = client_rumqtt::MqttOptions::new("foo", "localhost", 1883);
let (eventloop, client) = client_rumqtt::EventLoop::new(opts, 0);
let (mut application, client) = ApplicationBuilder::new("foo", eventloop, client, SubscriptionConfig::AllGroups).build();
application.run().await
}
More examples can be found in the examples and in the docs.
codegen uses protoc Protocol Buffers compiler to generate types.
srad: Re-exports the srad-* crates under one package.srad-eon: SDK for building Sparkplug Edge Nodes.srad-app: SDK for building Sparkplug Applications.srad-client: Trait and type definitions for implementing clients to interact with Sparkplug.srad-client-rumqtt: Client implementation using rumqtt.srad-types: Utility and Protobuf generated types.srad-macros: Derive macro implementation for Templatescodegen: Generates types from protobuf files in protos.examples: Example Edge Node and application implementations.This project is dual licensed under the MIT and APACHE licenses.