flowbuilder/lib.rs
1//! # FlowBuilder - Async Flow Orchestration Framework
2//!
3//! FlowBuilder is a modular async flow orchestration framework with conditional execution and context sharing.
4//!
5//! ## Features
6//!
7//! - `core` (default): Core flow building functionality
8//! - `macros`: Procedural macros for easier flow definition
9//! - `logger`: Tracing and logging support
10//! - `runtime`: Advanced runtime features
11//! - `full`: All features enabled
12//!
13//! ## Quick Start
14//!
15//! ```rust
16//! use flowbuilder::prelude::*;
17//!
18//! #[tokio::main]
19//! async fn main() -> anyhow::Result<()> {
20//! let flow = FlowBuilder::new()
21//! .step(|ctx| async move {
22//! println!("Step 1 executed");
23//! Ok(())
24//! })
25//! .step(|ctx| async move {
26//! println!("Step 2 executed");
27//! Ok(())
28//! })
29//! .build();
30//!
31//! flow.execute().await?;
32//! Ok(())
33//! }
34//! ```
35
36#![cfg_attr(docsrs, feature(doc_cfg))]
37
38// Re-export core functionality
39pub use flowbuilder_context as context;
40pub use flowbuilder_core::*;
41
42#[cfg(feature = "runtime")]
43#[cfg_attr(docsrs, doc(cfg(feature = "runtime")))]
44pub use flowbuilder_runtime as runtime;
45
46#[cfg(feature = "yaml")]
47#[cfg_attr(docsrs, doc(cfg(feature = "yaml")))]
48pub use flowbuilder_yaml as yaml;
49
50/// Prelude module for easy imports
51pub mod prelude {
52 pub use flowbuilder_context::{FlowContext, SharedContext};
53 pub use flowbuilder_core::prelude::*;
54
55 #[cfg(feature = "runtime")]
56 #[cfg_attr(docsrs, doc(cfg(feature = "runtime")))]
57 pub use flowbuilder_runtime::*;
58
59 #[cfg(feature = "yaml")]
60 #[cfg_attr(docsrs, doc(cfg(feature = "yaml")))]
61 pub use flowbuilder_yaml::prelude::*;
62}