#multi-step #durable-execution #retries #retry #observability #event-driven #prometheus #deadlines #per-step #postgresql

zart

Durable execution framework — multi-step workflows with persistence, retries, and observability

3 unstable releases

Uses new Rust 2024

0.2.0 May 4, 2026
0.1.1 Apr 15, 2026
0.1.0 Apr 15, 2026

#1179 in Database interfaces


Used in 2 crates

MIT license

575KB
11K SLoC

zart

Durable multi-step workflows for Rust that survive process restarts.

Zart persists every step result to PostgreSQL. When a worker crashes and restarts, execution resumes from the last completed step — no work is repeated, no step runs twice. Concurrency is handled automatically via skip-locked polling.

At a glance

  • Durable execution — steps are checkpointed; replay is transparent
  • Retries — configurable per-step retry policies with backoff
  • Wait groups — fan-out/fan-in across parallel sub-tasks
  • Event-driven steps — pause execution until an external event arrives
  • Timeouts — per-handler and per-step deadlines
  • Observability — structured tracing and optional Prometheus metrics

Quick example

use zart::prelude::*;

#[zart_durable("onboard-user")]
async fn onboard(data: UserId) -> Result<(), MyError> {
    zart::require(SendWelcomeEmail { id: data }).await?;
    zart::require(ProvisionAccount { id: data }).await?;
    Ok(())
}

Each require call is a durable step. On the first run it executes and persists the result; on replay it returns the cached value instantly.

Learn more

Dependencies

~52–71MB
~1M SLoC