Expand description
§RustChain - Enterprise Workflow Automation Framework
RustChain is a high-performance, type-safe workflow automation framework written in Rust. It provides mission-based orchestration with built-in safety and AI capabilities.
§Features
- Mission Engine: DAG-based workflow execution with dependency resolution
- AI Integration: LLM support, agent systems, and RAG (Retrieval-Augmented Generation)
- Safety: Policy engine with formal verification and security controls
- Transpilation: Convert workflows from GitHub Actions, Airflow, Jenkins, Terraform, and more
- Tools: Extensible tool system with built-in tools
- Memory: Vector stores and context management for AI workflows
§Quick Start
use rustchain::engine::{Mission, MissionStep, StepType, DagExecutor};
use rustchain::core::RuntimeContext;
use serde_json::json;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
// Create runtime context
let ctx = RuntimeContext::new();
// Define a simple mission
let mission = Mission {
version: "1.0".to_string(),
name: "Hello World".to_string(),
description: Some("My first mission".to_string()),
steps: vec![
MissionStep {
id: "greet".to_string(),
name: "Greet User".to_string(),
step_type: StepType::Command,
parameters: json!({
"command": "echo",
"args": ["Hello, RustChain!"]
}),
depends_on: None,
timeout_seconds: Some(30),
continue_on_error: None,
}
],
config: None,
};
// Execute the mission
let result = DagExecutor::execute_mission(mission, &ctx).await?;
println!("Mission completed: {:?}", result.status);
Ok(())
}§Architecture
RustChain follows a modular architecture designed for safety, extensibility, and performance:
- Core: Runtime context, configuration, audit logging, and error handling
- Engine: Mission execution with DAG-based dependency resolution and async step processing
- Policy: Safety validation and compliance enforcement with rule-based policies
- Tools: Extensible tool system with type-safe parameters and capability detection
- AI: LLM integration, autonomous agents, and memory systems for intelligent workflows
- Transpiler: Universal workflow import/export supporting multiple formats
- Safety: Runtime security controls and audit trail verification
§Feature Flags
RustChain uses cargo features to enable optional functionality. Core modules (core, engine, policy, runtime, safety, telemetry, validation, performance, build_dashboard, benchmarks) are always available.
llm- LLM integration (OpenAI, Anthropic, etc.)agent- Autonomous agent systemstools- Built-in tool libraryrag- Retrieval-Augmented Generationtranspiler- Workflow import/exportenterprise- Enterprise features and securitymemory- Vector stores and context managementchain- Chain-based workflowssmt- Satisfiability modulo theoriesregistry- Tool and model registryserver- HTTP server functionalitycli- Command-line interfaceconcurrency- Advanced concurrency featuresinvariants- Runtime invariant checkingsandbox- Sandboxed execution
§Safety and Compliance
RustChain provides built-in safety guarantees:
- Path traversal prevention
- Command injection protection
- Resource usage limits
- Audit logging with cryptographic chain verification
- Policy engine with safety validation and compliance enforcement
§Performance
- Async/await throughout for maximum concurrency
- Memory safety with Rust’s ownership system
For more information, see the documentation and examples.
Modules§
- benchmarks
- Benchmarking suite for competitive analysis
- build_
dashboard - cli
- core
- Core Runtime Infrastructure
- engine
- Mission Execution Engine
- invariant_
ppt - performance
- policy
- Policy Engine
- runtime
- RustChain Runtime
- safety
- Safety Validator
- telemetry
- tools
- transpiler
- Universal Transpiler System for RustChain
- validation
Macros§
- assert_
invariant - instrument_
db - Database operation instrumentation
- instrument_
llm - LLM request instrumentation
- instrument_
mission - Mission execution instrumentation
- instrument_
tool - Tool execution instrumentation
- span_
with_ context - Custom span creation with common attributes
- time_
operation - Macro for easy performance timing