DEV Community

Yacine
Yacine

Posted on

Sayiir — a durable workflow engine in Rust, simple, with Python & Node.js bindings

I've been building Sayiir, a durable workflow engine with a Rust core. I'd love to get feedback from this community.

The problem

Most workflow engines (Temporal, Airflow, etc.) come with heavy infrastructure, custom DSLs, or replay-based execution that imposes determinism constraints on your code. I wanted something that feels like writing normal async Rust/Python/TypeScript — no YAML, no sandboxing, no replaying your entire history on every recovery.

How Sayiir works

Sayiir is continuation-driven rather than replay-based:

  • No replay overhead — on crash recovery, execution resumes from the last checkpoint, not from the beginning of the workflow history
  • No determinism constraints — your tasks can call any API, use any library, do whatever you want. No purity rules.
  • No DSL — compose workflows with native language constructs. A workflow! macro in Rust, a fluent builder in Python/TS.
#[task(timeout = "30s", retries = 3)]
async fn fetch_user(id: UserId) -> Result<User, BoxError> {
    db.get_user(id).await
}

#[task]
async fn send_email(user: User) -> Result<(), BoxError> {
    email_service.send_welcome(&user).await
}

let workflow = workflow! {
    name: "welcome",
    steps: [fetch_user, send_email]
}
.unwrap();

// In-memory or plug in a durable PostgreSQL backend
let runner = CheckpointingRunner::new(PostgresBackend::connect("postgres://...").await?);
runner.run(&workflow, "welcome-42", user_id).await?;
Enter fullscreen mode Exit fullscreen mode

Architecture

The core is a graph-based execution engine in pure Rust with hexagonal architecture:

  • sayiir-core — the execution engine, zero dependencies on any runtime
  • sayiir-persistence — pluggable backends (PostgreSQL stable, more planned)
  • sayiir-runtime — async runtime integration + proc macros
  • Python bindings via PyO3/maturin
  • Node.js bindings via NAPI-RS

Codec is pluggable too — JSON by default, swap to rkyv or any binary format.

Status

Core, Python bindings, Node.js bindings, and PostgreSQL backend are all stable. Cloudflare Workers support is in progress.

Links

MIT licensed. Looking for contributors, early adopters, and feedback. What do you think — does this approach make sense? What would you want to see next?

Top comments (0)