From 879da364d6638513e7276e7c5beb03cd3283416c Mon Sep 17 00:00:00 2001 From: echozyr2001 Date: Tue, 24 Jun 2025 16:09:25 +0800 Subject: [PATCH 1/3] bump version to v0.5.0 --- CHANGELOG.md | 17 +++++++++++++++++ Cargo.lock | 2 +- README.md | 2 +- cosmoflow/Cargo.toml | 2 +- cosmoflow/README.md | 2 +- docs/features.md | 14 +++++++------- docs/getting-started.md | 2 +- 7 files changed, 29 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e7f1c0..fec096c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,23 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.5.0] - 2025-06-24 + +### Added +- Loop flow support for iterative workflow patterns +- Enhanced feature configuration system with better granularity +- New `storage-memory` as default feature for improved usability + +### Changed +- **BREAKING**: Restructured feature flags for better modularity +- Made async support optional with dedicated `async` feature +- Improved default configuration to be more user-friendly with `basic` feature set +- Enhanced storage backend feature organization + +### Fixed +- Improved compile-time dependency management +- Better feature gate organization for optional dependencies + ## [0.4.0] - 2025-06-20 ### Added diff --git a/Cargo.lock b/Cargo.lock index b39ffe5..0d40170 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -169,7 +169,7 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cosmoflow" -version = "0.4.0" +version = "0.5.0" dependencies = [ "async-trait", "redis", diff --git a/README.md b/README.md index 10487c1..ba464d5 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Add to your `Cargo.toml`: ```toml [dependencies] -cosmoflow = { version = "0.4.0", features = ["storage-memory"] } +cosmoflow = { version = "0.5.0", features = ["storage-memory"] } ``` Create your first workflow: diff --git a/cosmoflow/Cargo.toml b/cosmoflow/Cargo.toml index 933b20d..41552c3 100644 --- a/cosmoflow/Cargo.toml +++ b/cosmoflow/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmoflow" -version = "0.4.0" +version = "0.5.0" edition = "2024" authors = ["echozyr2001 "] description = "CosmoFlow - A type-safe workflow engine for Rust, inspired by PocketFlow and optimized for LLM applications" diff --git a/cosmoflow/README.md b/cosmoflow/README.md index 10487c1..ba464d5 100644 --- a/cosmoflow/README.md +++ b/cosmoflow/README.md @@ -49,7 +49,7 @@ Add to your `Cargo.toml`: ```toml [dependencies] -cosmoflow = { version = "0.4.0", features = ["storage-memory"] } +cosmoflow = { version = "0.5.0", features = ["storage-memory"] } ``` Create your first workflow: diff --git a/docs/features.md b/docs/features.md index 47b3e57..9568dda 100644 --- a/docs/features.md +++ b/docs/features.md @@ -7,7 +7,7 @@ This guide covers CosmoFlow's feature system and configuration options. ### Minimal Configuration ```toml [dependencies] -cosmoflow = { version = "0.4.0", default-features = false, features = ["minimal"] } +cosmoflow = { version = "0.5.0", default-features = false, features = ["minimal"] } ``` - **Features**: None (truly minimal) - **Storage**: No storage backends enabled @@ -17,7 +17,7 @@ cosmoflow = { version = "0.4.0", default-features = false, features = ["minimal" ### Basic Configuration ```toml [dependencies] -cosmoflow = { version = "0.4.0", default-features = false, features = ["basic"] } +cosmoflow = { version = "0.5.0", default-features = false, features = ["basic"] } ``` - **Features**: Memory storage only - **Storage**: In-memory storage backend @@ -27,7 +27,7 @@ cosmoflow = { version = "0.4.0", default-features = false, features = ["basic"] ### Standard Configuration (Recommended) ```toml [dependencies] -cosmoflow = { version = "0.4.0", default-features = false, features = ["standard"] } +cosmoflow = { version = "0.5.0", default-features = false, features = ["standard"] } ``` - **Features**: Memory storage + built-in nodes - **Storage**: In-memory storage backend @@ -37,7 +37,7 @@ cosmoflow = { version = "0.4.0", default-features = false, features = ["standard ### Full Configuration ```toml [dependencies] -cosmoflow = { version = "0.4.0", default-features = false, features = ["full"] } +cosmoflow = { version = "0.5.0", default-features = false, features = ["full"] } ``` - **Features**: All storage backends + built-in nodes - **Storage**: Memory and file-based storage @@ -61,13 +61,13 @@ You can mix and match features for your specific needs: ```toml # Memory storage + built-ins -cosmoflow = { version = "0.4.0", default-features = false, features = ["storage-memory", "builtin"] } +cosmoflow = { version = "0.5.0", default-features = false, features = ["storage-memory", "builtin"] } # File storage only -cosmoflow = { version = "0.4.0", default-features = false, features = ["storage-file"] } +cosmoflow = { version = "0.5.0", default-features = false, features = ["storage-file"] } # Both storage backends, no built-ins -cosmoflow = { version = "0.4.0", default-features = false, features = ["storage-full"] } +cosmoflow = { version = "0.5.0", default-features = false, features = ["storage-full"] } ``` ## 📊 Feature Comparison diff --git a/docs/getting-started.md b/docs/getting-started.md index c8e10a6..63f371a 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -8,7 +8,7 @@ Add CosmoFlow to your `Cargo.toml`: ```toml [dependencies] -cosmoflow = { version = "0.4.0", features = ["standard"] } +cosmoflow = { version = "0.5.0", features = ["standard"] } tokio = { version = "1.0", features = ["full"] } ``` From 737cc8c89bbcea0eacb63510a4753855e9da624b Mon Sep 17 00:00:00 2001 From: echozyr2001 Date: Tue, 24 Jun 2025 16:12:47 +0800 Subject: [PATCH 2/3] docs: update features.md for v0.5.0 --- docs/features.md | 69 ++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 32 deletions(-) diff --git a/docs/features.md b/docs/features.md index 9568dda..93a2090 100644 --- a/docs/features.md +++ b/docs/features.md @@ -9,39 +9,41 @@ This guide covers CosmoFlow's feature system and configuration options. [dependencies] cosmoflow = { version = "0.5.0", default-features = false, features = ["minimal"] } ``` -- **Features**: None (truly minimal) +- **Features**: Core engine only - **Storage**: No storage backends enabled -- **Built-ins**: No built-in nodes +- **Async**: No async support - **Use case**: When you want to implement everything yourself or use as a core library -### Basic Configuration +### Basic Configuration (Default) ```toml [dependencies] -cosmoflow = { version = "0.5.0", default-features = false, features = ["basic"] } +cosmoflow = { version = "0.5.0", features = ["basic"] } +# or simply +cosmoflow = "0.5.0" ``` - **Features**: Memory storage only - **Storage**: In-memory storage backend -- **Built-ins**: No built-in nodes -- **Use case**: Simple workflows that don't need persistence +- **Async**: No async support +- **Use case**: Simple workflows that don't need persistence or async ### Standard Configuration (Recommended) ```toml [dependencies] -cosmoflow = { version = "0.5.0", default-features = false, features = ["standard"] } +cosmoflow = { version = "0.5.0", features = ["standard"] } ``` -- **Features**: Memory storage + built-in nodes +- **Features**: Memory storage + async support - **Storage**: In-memory storage backend -- **Built-ins**: All built-in node types -- **Use case**: Most applications that need quick setup and common functionality +- **Async**: Full async/await support +- **Use case**: Most applications that need async workflows ### Full Configuration ```toml [dependencies] -cosmoflow = { version = "0.5.0", default-features = false, features = ["full"] } +cosmoflow = { version = "0.5.0", features = ["full"] } ``` -- **Features**: All storage backends + built-in nodes -- **Storage**: Memory and file-based storage -- **Built-ins**: All built-in node types +- **Features**: All storage backends + async support +- **Storage**: Memory, file, and Redis storage +- **Async**: Full async/await support - **Use case**: Applications that need all features and flexibility ## 🧩 Individual Features @@ -49,42 +51,45 @@ cosmoflow = { version = "0.5.0", default-features = false, features = ["full"] } ### Storage Backend Features - `storage-memory`: Enable in-memory storage (fast, non-persistent) - `storage-file`: Enable file-based storage (persistent, disk-based) +- `storage-redis`: Enable Redis storage (distributed, persistent) - `storage-full`: Enable all storage backends -### Functionality Features -- `builtin`: Enable built-in node types (SetValue, GetValue, Delay, Log) -- `builtin-full`: Enable all built-in functionality +### Core Features +- `async`: Enable async/await support with tokio integration ## 🛠️ Custom Combinations You can mix and match features for your specific needs: ```toml -# Memory storage + built-ins -cosmoflow = { version = "0.5.0", default-features = false, features = ["storage-memory", "builtin"] } +# Memory storage + async +cosmoflow = { version = "0.5.0", default-features = false, features = ["storage-memory", "async"] } # File storage only cosmoflow = { version = "0.5.0", default-features = false, features = ["storage-file"] } -# Both storage backends, no built-ins -cosmoflow = { version = "0.5.0", default-features = false, features = ["storage-full"] } +# All storage backends with async +cosmoflow = { version = "0.5.0", default-features = false, features = ["storage-full", "async"] } + +# Redis storage with async +cosmoflow = { version = "0.5.0", default-features = false, features = ["storage-redis", "async"] } ``` ## 📊 Feature Comparison -| Configuration | Binary Size | Compile Time | Memory Storage | File Storage | Built-ins | Best For | -|---------------|-------------|--------------|----------------|--------------|-----------|----------| -| minimal | Smallest | Fastest | ❌ | ❌ | ❌ | Core library usage | -| basic | Small | Fast | ✅ | ❌ | ❌ | Simple workflows | -| standard | Medium | Medium | ✅ | ❌ | ✅ | Most applications | -| full | Largest | Slowest | ✅ | ✅ | ✅ | Feature-rich apps | +| Configuration | Binary Size | Compile Time | Memory Storage | File Storage | Redis Storage | Async | Best For | +|---------------|-------------|--------------|----------------|--------------|---------------|-------|----------| +| minimal | Smallest | Fastest | ❌ | ❌ | ❌ | ❌ | Core library usage | +| basic | Small | Fast | ✅ | ❌ | ❌ | ❌ | Simple sync workflows | +| standard | Medium | Medium | ✅ | ❌ | ❌ | ✅ | Most applications | +| full | Largest | Slowest | ✅ | ✅ | ✅ | ✅ | Feature-rich apps | ## 🚀 Migration Guide -If you're currently using CosmoFlow with all features, you can: +If you're upgrading from an earlier version: -1. **Keep current behavior**: Use `features = ["full"]` -2. **Optimize for your use case**: Choose `standard` for most apps -3. **Minimize dependencies**: Use `basic` or `minimal` for specific needs +1. **Keep current behavior**: Use `features = ["full"]` for maximum compatibility +2. **Optimize for your use case**: Choose `standard` for most async apps +3. **Minimize dependencies**: Use `basic` for simple sync workflows or `minimal` for core usage -The default configuration is now empty (`default = []`), so you must explicitly choose features when adding CosmoFlow as a dependency. \ No newline at end of file +The default configuration is now `basic` (memory storage only), which provides a good balance of functionality and minimal dependencies. \ No newline at end of file From 16f47025c86db644c0be25f6577361fbc407829c Mon Sep 17 00:00:00 2001 From: echozyr2001 Date: Tue, 24 Jun 2025 16:17:38 +0800 Subject: [PATCH 3/3] docs: v0.5.0 CHANGELOG --- CHANGELOG.md | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fec096c..8c6bcc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,19 +8,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.5.0] - 2025-06-24 ### Added -- Loop flow support for iterative workflow patterns -- Enhanced feature configuration system with better granularity -- New `storage-memory` as default feature for improved usability +- Loop flow support for iterative workflow patterns with self-routing capabilities +- New cookbook directory with production-ready examples and real-world solutions +- Enhanced feature configuration system with better granularity and modularity +- Async workflow support as optional feature for better compile-time optimization +- New convenience feature combinations: `minimal`, `basic`, `standard`, and `full` ### Changed -- **BREAKING**: Restructured feature flags for better modularity -- Made async support optional with dedicated `async` feature -- Improved default configuration to be more user-friendly with `basic` feature set -- Enhanced storage backend feature organization +- **BREAKING**: Restructured project organization - moved complex examples to `cookbook/` +- **BREAKING**: Made async support optional with dedicated `async` feature flag +- **BREAKING**: Changed default features to `basic` (storage-memory only) for better UX +- Enhanced storage backend feature organization with individual feature flags +- Improved example structure with separate simple examples and production cookbook +- Better separation between sync and async APIs for reduced compilation overhead ### Fixed -- Improved compile-time dependency management +- Improved compile-time dependency management with optional features - Better feature gate organization for optional dependencies +- Reduced binary size for applications not using all features ## [0.4.0] - 2025-06-20