Skip to main content

aether_core/
lib.rs

1//! # Aether Core
2//!
3//! Core library for AI-powered dynamic code injection framework.
4//!
5//! This crate provides the foundational components for template management,
6//! code injection, and transformation logic.
7//!
8//! ## Features
9//!
10//! - Template parsing and management
11//! - Slot-based code injection
12//! - Dynamic code transformation
13//! - Extensible provider trait for AI backends
14//!
15//! ## Example
16//!
17//! ```rust,ignore
18//! use aether_core::{Template, Slot, InjectionContext};
19//!
20//! let template = Template::new("{{AI:generate_button}}")
21//!     .with_slot("generate_button", "Create a submit button");
22//!
23//! let result = template.render_with_ai(&provider).await?;
24//! ```
25
26pub mod error;
27pub mod template;
28pub mod slot;
29pub mod provider;
30pub mod context;
31pub mod engine;
32pub mod validation;
33pub mod cache;
34pub mod toon;
35pub mod runtime;
36
37pub use error::{AetherError, Result};
38pub use template::Template;
39pub use slot::{Slot, SlotKind};
40pub use provider::{AiProvider, ProviderConfig};
41pub use context::InjectionContext;
42pub use engine::InjectionEngine;
43pub use runtime::AetherRuntime;
44
45/// Re-export commonly used types
46pub mod prelude {
47    pub use crate::{
48        Template, Slot, SlotKind,
49        AiProvider, ProviderConfig,
50        InjectionContext, InjectionEngine,
51        AetherError, Result,
52    };
53}