runtara-workflow-stdlib
Standard library for Runtara compiled workflow binaries. Combines the SDK runtime with built-in agents for complete workflow execution.
Overview
This crate is automatically linked into workflows compiled by runtara-workflows. It provides:
- Runtime Support: Re-exports
runtara-sdkfor checkpointing and signals - Built-in Agents: Re-exports
runtara-agentsfor HTTP, SFTP, CSV, XML, etc. - Connection Fetching: HTTP client for runtime credential retrieval
- Async Runtime: Tokio runtime for async operations
Installation
This crate is typically not used directly. Instead, it's linked into compiled workflows by runtara-workflows.
For custom stdlib development:
[]
= "1.0"
What's Included
Re-exported Crates
| Module | Source | Description |
|---|---|---|
sdk |
runtara-sdk |
Checkpointing, signals, durability |
agents |
runtara-agents |
HTTP, SFTP, CSV, XML, Transform agents |
serde |
serde |
Serialization framework |
serde_json |
serde_json |
JSON serialization |
Runtime Features
- Stderr Redirection: Captures stderr for OCI container logs
- Connection Service: Fetches credentials at runtime from product APIs
- Tokio Runtime: Full async runtime with all features
Creating a Custom Stdlib
Products can extend the standard library with custom agents:
1. Create Your Stdlib Crate
// my-product-stdlib/src/lib.rs
// Re-export everything from the base stdlib
pub use *;
// Add your custom agents
2. Configure Cargo.toml
[]
= "my-product-stdlib"
= "1.0.0"
[]
= ["rlib"]
[]
= "1.0"
= "1.0"
= { = "1.0", = ["derive"] }
3. Compile to .rlib
# Output: target/release/libmy_product_stdlib.rlib
4. Configure Workflow Compilation
5. Use Custom Agents in Workflows
Connection Service Integration
Compiled workflows fetch credentials at runtime:
use fetch_connection;
// Fetch connection configuration from product's connection service
let connection = fetch_connection.await?;
// Use connection config with agents
let sftp_config = connection.get.unwrap;
Usage in Generated Code
The workflow compiler generates code that uses stdlib exports:
// Generated workflow code (simplified)
use ;
async
Related Crates
runtara-sdk- Core SDK (re-exported)runtara-agents- Built-in agents (re-exported)runtara-workflows- Compiles scenarios using this stdlib
License
This project is licensed under AGPL-3.0-or-later.