robomotion 0.1.3

Official Rust SDK for building Robomotion RPA packages
Documentation
//! Robomotion Rust SDK
//!
//! This library provides the official Rust SDK for building Robomotion packages.
//! It offers a runtime framework for creating plugin-based automation nodes that
//! communicate with the Robomotion platform via gRPC.
//!
//! # Example
//!
//! ```ignore
//! use robomotion::prelude::*;
//!
//! #[derive(Node, Default)]
//! #[node(id = "MyPackage.HelloWorld", name = "Hello World", icon = "mdiHand", color = "#3498db")]
//! struct HelloWorld {
//!     node: NodeBase,
//!
//!     #[input(title = "Name", var_type = "string", scope = "Message", name = "name")]
//!     in_name: InVariable<String>,
//!
//!     #[output(title = "Greeting", var_type = "string", scope = "Message", name = "greeting")]
//!     out_greeting: OutVariable<String>,
//! }
//!
//! #[async_trait]
//! impl MessageHandler for HelloWorld {
//!     async fn on_create(&mut self) -> Result<()> {
//!         Ok(())
//!     }
//!
//!     async fn on_message(&mut self, ctx: &mut Context) -> Result<()> {
//!         let name = self.in_name.get(ctx).await?;
//!         self.out_greeting.set(ctx, format!("Hello, {}!", name)).await?;
//!         Ok(())
//!     }
//!
//!     async fn on_close(&mut self) -> Result<()> {
//!         Ok(())
//!     }
//! }
//!
//! #[tokio::main]
//! async fn main() {
//!     register_nodes![HelloWorld];
//!     start().await;
//! }
//! ```

pub mod debug;
pub mod message;
pub mod proto;
pub mod runtime;
pub mod utils;

// Re-export commonly used types
pub mod prelude {
    pub use crate::message::Context;
    pub use crate::runtime::{
        start, register_nodes, Credential, InVariable, MessageHandler, Node, NodeBase,
        OptVariable, OutVariable, Port, Result, RobomotionError, Tool, NodeSpec, HasNodeBase,
    };
    pub use async_trait::async_trait;
    pub use robomotion_derive::Node;
}

// Re-export derive macro
pub use robomotion_derive::Node;