Skip to content

Commit 44b555a

Browse files
committed
git pchore(release): cano + cano-macros 0.10.0
1 parent a9d04be commit 44b555a

10 files changed

Lines changed: 25 additions & 24 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div align="center">
2-
<img src="docs/logo.png" alt="Cano Logo" width="200">
2+
<img src="docs/static/logo.png" alt="Cano Logo" width="200">
33
<h1>Cano: Type-Safe Async Workflow Engine</h1>
44

55
[![Crates.io](https://img.shields.io/crates/v/cano.svg)](https://crates.io/crates/cano)

cano-macros/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ mod resource_derive;
2929
mod task_impl;
3030

3131
/// Derive a `from_resources(&Resources<_>) -> CanoResult<Self>` constructor that
32-
/// pulls each field out of a [`cano::Resources`] map.
32+
/// pulls each field out of a `cano::Resources` map.
3333
///
3434
/// Each field must be `Arc<T>`. Use `#[res("key")]` for string-literal lookups
3535
/// or `#[res(EnumType::Variant)]` for enum-path lookups. Use

cano/src/lib.rs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,11 @@
139139
//!
140140
//! ## Module Overview
141141
//!
142-
//! - [`task`]: The [`Task`] trait — single `run()` method
143-
//! - [`node`]: The [`Node`] trait — three-phase lifecycle with retry via [`TaskConfig`]
142+
//! - [`mod@task`]: The [`Task`] trait — single `run()` method
143+
//! - [`mod@node`]: The [`Node`] trait — three-phase lifecycle with retry via [`TaskConfig`]
144144
//! - [`workflow`]: [`Workflow`] — FSM orchestration with Split/Join support
145145
//! - [`scheduler`] (requires `scheduler` feature): [`Scheduler`] — cron and interval scheduling
146-
//! - [`resource`]: [`Resource`] trait and [`Resources`] dictionary — lifecycle-aware resource management
146+
//! - [`mod@resource`]: [`Resource`] trait and [`Resources`] dictionary — lifecycle-aware resource management
147147
//! - [`store`]: [`MemoryStore`] and the [`KeyValueStore`] trait — [`MemoryStore`] implements [`Resource`]
148148
//! - [`error`]: [`CanoError`] variants and the [`CanoResult`] alias
149149
//!
@@ -181,7 +181,7 @@ pub use scheduler::{FlowInfo, Scheduler};
181181
/// to rewrite `async fn` methods into ones returning
182182
/// `Pin<Box<dyn Future<Output = ...> + Send + 'async_trait>>`.
183183
///
184-
/// Functionally identical to [`node`] and [`resource`]; the separate name makes
184+
/// Functionally identical to [`macro@node`] and [`macro@resource`]; the separate name makes
185185
/// `#[cano::task]` self-documenting at impl sites. The implementation lives in
186186
/// the [`cano-macros`] sibling crate.
187187
///
@@ -190,19 +190,19 @@ pub use cano_macros::task;
190190

191191
/// Attribute macro applied to the `Node` trait definition and `impl Node` blocks.
192192
///
193-
/// See [`task`] for the rewrite shape; this macro is functionally identical and
193+
/// See [`macro@task`] for the rewrite shape; this macro is functionally identical and
194194
/// differs only in name.
195195
pub use cano_macros::node;
196196

197197
/// Attribute macro applied to the `Resource` trait definition and `impl Resource` blocks.
198198
///
199-
/// See [`task`] for the rewrite shape; this macro is functionally identical and
199+
/// See [`macro@task`] for the rewrite shape; this macro is functionally identical and
200200
/// differs only in name.
201201
pub use cano_macros::resource;
202202

203203
/// Derive macro that generates a `from_resources` associated function for a struct.
204204
///
205-
/// See [`cano_macros::derive_from_resources`] for the full specification. Each
205+
/// See [`FromResources`] for the full specification. Each
206206
/// field must be `Arc<T>`; annotate it with `#[res("key")]` or
207207
/// `#[res(EnumKey::Variant)]`.
208208
pub use cano_macros::FromResources;
@@ -213,9 +213,8 @@ pub use cano_macros::FromResources;
213213
/// but derived directly from the struct definition. The trait's no-op `setup`
214214
/// and `teardown` defaults take effect automatically.
215215
///
216-
/// In the prelude, this is exported as [`Resource`](crate::prelude::Resource)
217-
/// alongside the trait of the same name — Rust's separate macro and type
218-
/// namespaces let them coexist.
216+
/// In the prelude, this is exported as [`Resource`] alongside the trait of the
217+
/// same name — Rust's separate macro and type namespaces let them coexist.
219218
pub use cano_macros::Resource;
220219

221220
// Convenience re-exports for common patterns

cano/src/node.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
//!
66
//! ## Task vs Node - Choose the Right Tool
77
//!
8-
//! - **Use [`Task`]** for simple processing with a single `run()` method.
8+
//! - **Use [`Task`](crate::task::Task)** for simple processing with a single `run()` method.
99
//! - **Use [`Node`]** for structured processing with a three-phase lifecycle.
1010
//!
1111
//! Both `Task` and `Node` support retry strategies.
1212
//!
13-
//! **Every [`Node`] automatically implements [`Task`]**, so you can mix and match in the same workflow.
13+
//! **Every [`Node`] automatically implements [`Task`](crate::task::Task)**, so you can mix and match in the same workflow.
1414
//!
1515
//! ## Unified API Benefits
1616
//!
@@ -434,7 +434,7 @@ where
434434
///
435435
/// Use this when you need to store different node types in the same collection.
436436
/// `TResourceKey` defaults to [`Cow<'static, str>`](std::borrow::Cow) to match
437-
/// [`Resources`](crate::resource::Resources); pass an enum key type for typed
437+
/// [`Resources`]; pass an enum key type for typed
438438
/// resource lookups.
439439
pub type DynNode<TState, TResourceKey = Cow<'static, str>> = dyn Node<TState, TResourceKey, PrepResult = DefaultNodeResult, ExecResult = DefaultNodeResult>
440440
+ Send

cano/src/scheduler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//!
1010
//! ```toml
1111
//! [dependencies]
12-
//! cano = { version = "0.8", features = ["scheduler"] }
12+
//! cano = { version = "0.10", features = ["scheduler"] }
1313
//! ```
1414
1515
use crate::error::{CanoError, CanoResult};

cano/src/task.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ where
573573
///
574574
/// Use this when you need to store different task types in the same collection.
575575
/// `TResourceKey` defaults to [`Cow<'static, str>`](std::borrow::Cow) to match
576-
/// [`Resources`](crate::resource::Resources); pass an enum key type for typed
576+
/// [`Resources`]; pass an enum key type for typed
577577
/// resource lookups.
578578
///
579579
/// ```

cano/src/workflow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ where
304304
{
305305
/// State machine with support for split/join.
306306
/// Arc-wrapped so the FSM loop clones the entry as a cheap refcount bump
307-
/// rather than cloning the inner Vec<Arc<dyn Task>> on every iteration.
307+
/// rather than cloning the inner `Vec<Arc<dyn Task>>` on every iteration.
308308
states: HashMap<TState, Arc<StateEntry<TState, TResourceKey>>>,
309309
/// Shared resources for all tasks
310310
pub(crate) resources: Arc<Resources<TResourceKey>>,

docs/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build_search_index = false
77
generate_feeds = false
88

99
[extra]
10-
version = "0.9.0"
10+
version = "0.10.0"
1111
github_url = "https://github.com/nassor/cano"
1212
crates_url = "https://crates.io/crates/cano"
1313
docsrs_url = "https://docs.rs/cano"

docs/content/_index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,12 @@ It excels at managing complex lifecycles where state transitions matter:
7979

8080
<div class="getting-started-code">
8181
<pre><code class="language-toml">[dependencies]
82-
cano = { version = "0.8", features = ["all"] }
83-
tokio = { version = "1", features = ["full"] }</code></pre>
82+
cano = { version = "0.10", features = ["all"] }
83+
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }</code></pre>
8484
</div>
8585

86+
<p>Cano runs on the Tokio runtime, so <code>tokio</code> is a required direct dependency — you launch the runtime via <code>#[tokio::main]</code> or <code>tokio::runtime::Builder</code>. The two features above are the minimum to do that; add <code>"time"</code>, <code>"sync"</code>, etc. only if your own code calls into them. Use <code>"full"</code> if you prefer convenience over compile time.</p>
87+
8688
<h3>Basic Example</h3>
8789
<div class="getting-started-code">
8890
<pre><code class="language-rust">use cano::prelude::*;

docs/content/tracing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ All tracing instrumentation is behind conditional compilation, so it adds zero o
4444
<code>features = ["all"]</code> to enable both <code>tracing</code> and <code>scheduler</code> at once.</p>
4545

4646
<pre><code class="language-toml">[dependencies]
47-
cano = { version = "0.8", features = ["tracing"] }
47+
cano = { version = "0.10", features = ["tracing"] }
4848
tracing = "0.1"
4949
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
5050
<!--blank-->
5151
# Or enable everything (tracing + scheduler):
52-
# cano = { version = "0.8", features = ["all"] }</code></pre>
52+
# cano = { version = "0.10", features = ["all"] }</code></pre>
5353

5454
<h3 id="basic-init"><a href="#basic-init" class="anchor-link" aria-hidden="true">#</a>Basic Initialization</h3>
5555
<p>For quick setup during development, use the default formatter.</p>
@@ -161,7 +161,7 @@ execution in log output.</p>
161161

162162
<pre><code class="language-toml"># Enable both scheduler and tracing
163163
[dependencies]
164-
cano = { version = "0.8", features = ["all"] }</code></pre>
164+
cano = { version = "0.10", features = ["all"] }</code></pre>
165165
<hr class="section-divider">
166166

167167
<h2 id="custom-spans"><a href="#custom-spans" class="anchor-link" aria-hidden="true">#</a>Custom Spans</h2>

0 commit comments

Comments
 (0)