Crate stellwerksim

source ·
Expand description

stellwerksim-rs

Rust SDK for writing asynchronous StellwerkSim plugins using tokio.

Implemented Request Types

Note: All request types except events are implemented. Feel free to contribute.

Example

Create plugin instance via the Plugin::builder. It will connect to StellwerkSim and register the plugin automatically.

use stellwerksim::{Error, Plugin};

#[tokio::main]
async fn main() -> Result<(), Error> {
    let plugin = Plugin::builder()
        .name("My stellwerksim-rs Plugin")
        .author("Me")
        .version(env!("CARGO_PKG_VERSION")) // Embed version from Cargo.toml
        .description("My plugin built with stellwerksim-rs")
        .connect().await?;
    Ok(())
}

Modules

  • StellwerkSim’s xml based protocol.

Structs

Enums