cargo-athena 0.7.0

Compile regular Rust into Argo Workflow YAML (library + `cargo athena` CLI)
Documentation

cargo-athena

crates.io docs.rs

Compile regular Rust into Argo Workflow YAML.

Annotate ordinary functions: a #[workflow] is a DAG, a #[container] is a step that runs real Rust in a pod, a #[fragment] is a plain helper that carries pod resources.

use cargo_athena::{workflow, container};

#[workflow]
fn run_foo() {
    let a = some_other_workflow("asdf".to_string());
    run_a_container(a);                       // data dep -> DAG edge
}

#[container(image = "ghcr.io/acme/app:latest")]
fn run_a_container(a: String) {
    println!("regular code, got: {a}");
}

fn main() { cargo_athena::entrypoint!(run_foo); }

Install

cargo add cargo-athena --no-default-features   # the library, in a workflow crate
cargo install cargo-athena                     # the `cargo athena` CLI

Library users: keep default-features = false. A workflow crate needs only the proc macros and runtime; the default cli feature pulls a heavy CLI tree (kube, reqwest, tokio, …) it doesn't use.

This facade is the only crate you depend on: it re-exports the runtime and proc macros behind one ::cargo_athena path. The cargo athena subcommands are emit / publish / submit / emulate / ls / describe.