Skip to content

Commit 090c168

Browse files
committed
Zola migrations: Add base HTML template and 404 error page
- Created a base HTML template for consistent layout across documentation pages. - Added a 404 error page to handle missing content gracefully. - Removed the old tracing.html file and replaced it with a more modular approach using templates. - Introduced index.html and page.html templates for better content management.
1 parent e7c4e6f commit 090c168

26 files changed

Lines changed: 4022 additions & 4327 deletions

.github/workflows/docs.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,36 @@ concurrency:
1616
cancel-in-progress: false
1717

1818
jobs:
19-
deploy:
20-
environment:
21-
name: "github-pages"
22-
url: ${{ steps.deployment.outputs.page_url }}
19+
build:
2320
runs-on: ubuntu-latest
2421
steps:
2522
- name: Checkout
2623
uses: actions/checkout@v4
2724

25+
- name: Install Zola
26+
uses: taiki-e/install-action@v2
27+
with:
28+
tool: zola
29+
30+
- name: Build site
31+
working-directory: docs
32+
run: zola build
33+
2834
- name: Setup Pages
2935
uses: actions/configure-pages@v4
3036

3137
- name: Upload artifact
3238
uses: actions/upload-pages-artifact@v3
3339
with:
34-
path: 'docs'
40+
path: 'docs/public'
3541

42+
deploy:
43+
needs: build
44+
environment:
45+
name: "github-pages"
46+
url: ${{ steps.deployment.outputs.page_url }}
47+
runs-on: ubuntu-latest
48+
steps:
3649
- name: Deploy to GitHub Pages
3750
id: deployment
3851
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
/target
22
**/.DS_Store
33

4+
# Zola build output
5+
docs/public/
6+
47
# Avoid agent files
58
.claude/
69
CLAUDE.md

docs/404.html

Lines changed: 0 additions & 60 deletions
This file was deleted.

docs/config.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
base_url = "https://nassor.github.io/cano"
2+
title = "Cano"
3+
description = "Async workflow orchestration engine for Rust built on Finite State Machines."
4+
default_language = "en"
5+
compile_sass = false
6+
build_search_index = false
7+
generate_feeds = false
8+
9+
[extra]
10+
version = "0.8.0"
11+
github_url = "https://github.com/nassor/cano"
12+
crates_url = "https://crates.io/crates/cano"
13+
docsrs_url = "https://docs.rs/cano"

docs/content/_index.md

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
+++
2+
title = "Cano - Async Data & AI Workflows in Rust"
3+
description = "Cano is a high-performance async workflow orchestration engine for Rust using Finite State Machines for type-safe processing pipelines."
4+
template = "index.html"
5+
+++
6+
7+
<section class="hero">
8+
<h1 class="animate-in">Cano</h1>
9+
<p class="subtitle animate-in">Type-safe async workflow engine with built-in scheduling, retry logic, and state machine semantics.</p>
10+
11+
<p class="prerelease-notice animate-in"><em>Cano still far from 1.0 release. The API is subject to changes and breaking changes.</em></p>
12+
13+
<div class="badges animate-in">
14+
<a href="https://crates.io/crates/cano" title="Crates.io">
15+
<img src="https://img.shields.io/crates/v/cano.svg" alt="Crates.io">
16+
</a>
17+
<a href="https://docs.rs/cano" title="API Documentation">
18+
<img src="https://docs.rs/cano/badge.svg" alt="Documentation">
19+
</a>
20+
<a href="https://crates.io/crates/cano" title="Download Statistics">
21+
<img src="https://img.shields.io/crates/d/cano.svg" alt="Downloads">
22+
</a>
23+
<a href="https://github.com/nassor/cano/blob/main/LICENSE" title="MIT License">
24+
<img src="https://img.shields.io/crates/l/cano.svg" alt="License">
25+
</a>
26+
</div>
27+
28+
<p class="animate-in">
29+
Cano is a high-performance orchestration engine designed for building resilient, self-healing systems in Rust.
30+
Unlike simple task queues, Cano uses <strong>Finite State Machines (FSM)</strong> to define strict, type-safe transitions between processing steps.
31+
</p>
32+
33+
<p class="animate-in">
34+
It excels at managing complex lifecycles where state transitions matter:
35+
</p>
36+
<ul class="animate-in">
37+
<li><strong>Data Pipelines</strong>: ETL jobs with parallel processing (Split/Join) and aggregation.</li>
38+
<li><strong>AI Agents</strong>: Multi-step inference chains with shared context and memory.</li>
39+
<li><strong>Background Systems</strong>: Scheduled maintenance, periodic reporting, and distributed cron jobs.</li>
40+
</ul>
41+
</section>
42+
43+
<h2>Features</h2>
44+
<div class="feature-grid">
45+
<div class="feature-card animate-in">
46+
<div class="feature-icon" aria-hidden="true">&#9881;</div>
47+
<h3>Tasks & Nodes</h3>
48+
<p>Single <code>Task</code> trait for simple logic, or <code>Node</code> trait for structured three-phase lifecycle.</p>
49+
</div>
50+
<div class="feature-card animate-in">
51+
<div class="feature-icon secondary" aria-hidden="true">&#9670;</div>
52+
<h3>State Machines</h3>
53+
<p>Type-safe enum-driven state transitions with compile-time checking.</p>
54+
</div>
55+
<div class="feature-card animate-in">
56+
<div class="feature-icon accent" aria-hidden="true">&#8635;</div>
57+
<h3>Retry Strategies</h3>
58+
<p>Fixed delays, exponential backoff with jitter, and custom strategies.</p>
59+
</div>
60+
<div class="feature-card animate-in">
61+
<div class="feature-icon" aria-hidden="true">&#9202;</div>
62+
<h3>Scheduling</h3>
63+
<p>Built-in scheduler with intervals, cron schedules, and manual triggers.</p>
64+
</div>
65+
<div class="feature-card animate-in">
66+
<div class="feature-icon secondary" aria-hidden="true">&#9881;</div>
67+
<h3>Concurrency</h3>
68+
<p>Execute multiple workflow instances in parallel with timeout strategies.</p>
69+
</div>
70+
<div class="feature-card animate-in">
71+
<div class="feature-icon accent" aria-hidden="true">&#9673;</div>
72+
<h3>Observability</h3>
73+
<p>Comprehensive tracing and observability for workflow execution.</p>
74+
</div>
75+
</div>
76+
77+
<h2>Getting Started</h2>
78+
<p>Add Cano to your <code>Cargo.toml</code>:</p>
79+
80+
<div class="getting-started-code">
81+
<pre><code class="language-toml">[dependencies]
82+
cano = { version = "0.8", features = ["all"] }
83+
tokio = { version = "1", features = ["full"] }</code></pre>
84+
</div>
85+
86+
<h3>Basic Example</h3>
87+
<div class="getting-started-code">
88+
<pre><code class="language-rust">use async_trait::async_trait;
89+
use cano::prelude::*;
90+
<!--blank-->
91+
// Define your workflow states
92+
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
93+
enum WorkflowState {
94+
Start,
95+
Process,
96+
Complete,
97+
}
98+
<!--blank-->
99+
// Simple Task implementation
100+
#[derive(Clone)]
101+
struct SimpleTask;
102+
<!--blank-->
103+
#[async_trait]
104+
impl Task<WorkflowState> for SimpleTask {
105+
async fn run_bare(&self) -> Result<TaskResult<WorkflowState>, CanoError> {
106+
println!("Processing task...");
107+
// Return the next state wrapped in TaskResult
108+
Ok(TaskResult::Single(WorkflowState::Process))
109+
}
110+
}
111+
<!--blank-->
112+
struct DoneTask;
113+
<!--blank-->
114+
#[async_trait]
115+
impl Task<WorkflowState> for DoneTask {
116+
async fn run_bare(&self) -> Result<TaskResult<WorkflowState>, CanoError> {
117+
println!("Done!");
118+
Ok(TaskResult::Single(WorkflowState::Complete))
119+
}
120+
}
121+
<!--blank-->
122+
#[tokio::main]
123+
async fn main() -> Result<(), CanoError> {
124+
// No resources needed — use Workflow::bare()
125+
let workflow = Workflow::bare()
126+
.register(WorkflowState::Start, SimpleTask)
127+
.register(WorkflowState::Process, DoneTask)
128+
.add_exit_state(WorkflowState::Complete);
129+
<!--blank-->
130+
// Run workflow starting at 'Start' state
131+
workflow.orchestrate(WorkflowState::Start).await?;
132+
<!--blank-->
133+
Ok(())
134+
}</code></pre>
135+
</div>
136+

0 commit comments

Comments
 (0)