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](https://img.shields.io/badge/unsafe-forbidden-success.svg)](https://github.com/rust-secure-code/safety-dance/)
[![License](https://img.shields.io/badge/License-MIT%20%2B%20Commercial-blue.svg)](#-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
```toml
[dependencies]
taskgraph-rs = "0.1"

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

## ๐Ÿ› ๏ธ Usage

### Synchronous (no_std / IoT / CLI)
```rust
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)
```rust
#[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](LICENSE)

| Usage | Price | Link |
|---|---|---|
| Personal / Open Source | Free (MIT) | โ€” |
| Startup (revenue < $1M/year) | โ‚ฌ99 one-time | [Buy Startup License โ†’]https://buy.polar.sh/polar_cl_MMxcQlmU0iWqiyS76y6L5jolRDgelacR6n4Xg0UfutX |
| Business (revenue > $1M/year) | โ‚ฌ499 one-time | [Buy Business License โ†’]https://buy.polar.sh/polar_cl_rySzRQLoExTlLjtt2YnQAcPjpqg3XsjQoukqm1dU4Ra |

---
*Built by [Ferrolab](https://github.com/ferrolab-rs) ยท ferrolab@tutamail.com*