Expand description
§Zeal Rust SDK
High-performance Rust SDK for the Zeal Integration Protocol (ZIP), enabling efficient third-party workflow runtime integration with the Zeal workflow editor.
§Features
- Zero-copy JSON parsing with
serde_jsonand optionalsimd-json - Async/await support with
tokioandfutures - WebSocket real-time communication with
tokio-tungstenite - HTTP/2 client with
reqwestand connection pooling - Observable streams with
futures-utiland custom stream combinators - Built-in retry logic with exponential backoff
- Thread-safe concurrent operations
§Quick Start
ⓘ
use zeal_sdk::{ZealClient, ClientConfig};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = ZealClient::new(ClientConfig {
base_url: "http://localhost:3000".to_string(),
..Default::default()
})?;
// Register node templates
client.templates().register(
"my-runtime",
vec![/* templates */],
None
).await?;
Ok(())
}Re-exports§
pub use client::ZealClient;pub use config::ClientConfig;pub use config::PerformanceConfig;pub use errors::Result;pub use errors::ZealError;pub use subscription::SubscriptionOptions;pub use subscription::WebhookSubscription;pub use events::ConnectionState;pub use events::ConnectionStateEvent;pub use events::ElementState;pub use events::ElementType;pub use events::ExecutionCompletedEvent;pub use events::ExecutionFailedEvent;pub use events::ExecutionStartedEvent;pub use events::NodeCompletedEvent;pub use events::NodeExecutingEvent;pub use events::NodeFailedEvent;pub use events::NodeWarningEvent;pub use events::VisualStateElement;pub use events::VisualStateUpdate;pub use events::WorkflowCreatedEvent;pub use events::WorkflowDeletedEvent;pub use events::WorkflowUpdatedEvent;pub use events::ZipControlEvent;pub use events::ZipExecutionEvent;pub use events::ZipWebSocketEvent;pub use events::ZipWebhookEvent;pub use events::ZipWorkflowEvent;pub use observables::ObservableExt;pub use observables::ZealObservable;pub use traces::TraceEvent;pub use traces::TraceEventType;pub use traces::TraceStatus;pub use types::*;
Modules§
- auth
- Authentication utilities for ZIP SDK Generates auth tokens with the required information for zeal-auth
- client
- Main ZealClient for the Rust SDK
- config
- Configuration types for the Zeal SDK
- errors
- Error types for the Zeal SDK
- events
- ZIP Event types and WebSocket communication
- observables
- Observable stream extensions for event processing
- orchestrator
- Orchestrator API for workflow management
- subscription
- Webhook subscription management
- templates
- Templates API for managing node templates
- traces
- Traces API for workflow execution tracing
- types
- Type definitions for the Zeal SDK
- webhooks
- Webhooks API for managing webhook subscriptions
Constants§
- API_
PREFIX - Default API path prefix
- VERSION
- SDK version
- WS_PATH
- Default WebSocket path