taskgraph-rs 0.1.2

NASA-grade, zero-dependency DAG task orchestrator for Rust
Documentation

taskgraph-rs โš“

A NASA-grade, zero-dependency, no_std DAG task orchestrator library for Rust.

unsafe forbidden License

๐Ÿš€ Vision

taskgraph-rs is a lightweight, high-performance engine designed to execute interdependent tasks (DAG - Directed Acyclic Graph) in parallel. Built for environments where reliability, safety, and performance are non-negotiable.

Core Pillars:

  • Zero-Unsafe โ€” #![forbid(unsafe_code)] strictly enforced
  • Zero-Deps โ€” No dependencies by default, no_std compatible
  • Dual Runtime โ€” Sync (no_std/IoT) and Async (Tokio) support
  • 14.8M tasks/sec โ€” Lock-free atomic orchestration, benchmarked

๐ŸŽฏ Perfect for

โœ… IoT & Embedded systems (ESP32, ARM โ€” runs in < 1KB RAM)
โœ… Game engines in Rust (parallel asset loading pipelines)
โœ… Medical / Defense (offline, air-gapped, zero cloud)
โœ… CLI tools with complex step dependencies
โœ… Any Rust app needing a parallel task pipeline

โŒ Not a replacement for Apache Airflow (no UI, no cron)
โŒ Not for distributed multi-server workflows

๐Ÿ“ฆ Installation

[dependencies]
taskgraph-rs = "0.1"

# Async support (Tokio)
# taskgraph-rs = { version = "0.1", features = ["async"] }

๐Ÿ› ๏ธ Usage

Synchronous (no_std / IoT / CLI)

use taskgraph::{Task, TaskGraph, StaticStore};

fn main() -> taskgraph::Result<()> {
    let storage = StaticStore::<10>::new()?;
    let mut graph = TaskGraph::new(storage);

    let id_a = graph.task(Task::new_static("TaskA", || Ok(())), &[])?;
    let _id_b = graph.task(Task::new_static("TaskB", || Ok(())), &[id_a])?;

    graph.run_sync()?;
    Ok(())
}

Asynchronous (Tokio)

#[tokio::main]
async fn main() -> taskgraph::Result<()> {
    let mut graph = TaskGraph::new(taskgraph::DynamicStore::new());

    let t = Task::new_async("Fetch", || Box::pin(async { Ok(()) }))
        .with_timeout(Duration::from_secs(30))
        .with_retries(3);

    graph.task(t, &[])?;
    graph.run_async().await?;
    Ok(())
}

๐Ÿ›ก๏ธ Security & Reliability

  • No Panics โ€” Zero unwrap() in the core library
  • Cycle Detection โ€” Kahn's Algorithm, deterministic
  • Panic Isolation โ€” One task panics, others continue
  • Timeout โ€” Async tasks cancelled cleanly on timeout

โš–๏ธ License

Free for non-commercial use โ€” see LICENSE

Usage Price Link
Personal / Open Source Free (MIT) โ€”
Startup (revenue < $1M/year) โ‚ฌ99 one-time Buy Startup License โ†’
Business (revenue > $1M/year) โ‚ฌ499 one-time Buy Business License โ†’

Built by Ferrolab ยท ferrolab@tutamail.com