| Crates.io | robomotion |
| lib.rs | robomotion |
| version | 0.1.3 |
| created_at | 2025-12-18 07:20:07.921273+00 |
| updated_at | 2025-12-18 09:27:52.801967+00 |
| description | Official Rust SDK for building Robomotion RPA packages |
| homepage | https://robomotion.io |
| repository | https://github.com/robomotionio/robomotion-rust |
| max_upload_size | |
| id | 1991886 |
| size | 398,809 |
Official Rust SDK for building Robomotion RPA packages.
Robomotion is a Robotic Process Automation (RPA) platform that allows you to build automation workflows using visual flow designers. This SDK enables you to create custom nodes (packages) in Rust that can be used within Robomotion flows.
Add this to your Cargo.toml:
[dependencies]
robomotion = "0.1"
tokio = { version = "1", features = ["full"] }
async-trait = "0.1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
use robomotion::prelude::*;
use robomotion::message::Context;
#[derive(Node, Default)]
#[node(id = "MyPackage.Hello", name = "Hello", icon = "mdiHand", color = "#3498db")]
pub struct HelloNode {
#[serde(flatten)]
pub node: NodeBase,
#[input(title = "Name", var_type = "string", scope = "Message", name = "name")]
pub in_name: InVariable<String>,
#[output(title = "Greeting", var_type = "string", scope = "Message", name = "greeting")]
pub out_greeting: OutVariable<String>,
}
#[async_trait]
impl MessageHandler for HelloNode {
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(())
}
}
use robomotion::prelude::*;
mod hello;
#[tokio::main]
async fn main() {
register_node::<hello::HelloNode>();
start().await;
}
{
"name": "My Package",
"namespace": "MyPackage",
"version": "1.0.0",
"language": "Rust",
"platforms": ["linux", "windows", "darwin"]
}
Important: All node IDs must start with the namespace from config.json. If namespace is
MyPackage, node IDs must beMyPackage.NodeName.
InVariable<T>, OutVariable<T>, OptVariable<T>on_create, on_message, on_close| Type | Usage | Access |
|---|---|---|
InVariable<T> |
Required input | .get(ctx).await |
OptVariable<T> |
Optional input | .get(ctx).await returns Option<T> |
OutVariable<T> |
Output | .set(ctx, value).await |
Credential |
Vault access | .get(ctx).await returns credentials |
#[derive(Node, Default)]
#[node(
id = "Namespace.NodeName", // Must match config.json namespace
name = "Display Name",
icon = "mdiIcon",
color = "#3498db",
inputs = 1,
outputs = 1
)]
MIT License - see LICENSE for details.