rain_engine/lib.rs
1//! # RainEngine
2//!
3//! `rain-engine` is the single public entrypoint for the RainEngine workspace.
4//! The implementation remains split into focused crates, but consumers can
5//! depend on this crate and opt into integrations with feature flags.
6//!
7//! ## Feature guide
8//!
9//! - core kernel: always available
10//! - retrieval utilities: `memory`
11//! - blob backends: `blob`
12//! - cognition helpers: `cognition`
13//! - WASM skill execution: `wasm`
14//! - runtime HTTP surface: `runtime`
15//! - runtime HTTP client: `client`
16//! - channel adapters: `channels`
17//! - Gemini provider: `provider-gemini`
18//! - OpenAI-compatible provider: `provider-openai`
19//! - SQLite store: `store-sqlite`
20//! - Postgres store: `store-pg`
21//! - Valkey coordination store: `store-valkey`
22//!
23//! The default feature set stays lightweight and enables `memory` plus `blob`.
24
25#[cfg(feature = "runtime")]
26mod server;
27
28/// Provider-neutral kernel types, traits, and execution primitives.
29pub mod kernel {
30 pub use rain_engine_core::*;
31}
32
33/// Retrieval helpers built on top of the kernel ledger.
34#[cfg(feature = "memory")]
35pub mod memory {
36 pub use rain_engine_memory::*;
37}
38
39/// Blob backends for multimodal attachment storage.
40#[cfg(feature = "blob")]
41pub mod blob {
42 pub use rain_engine_blob::*;
43}
44
45/// Optional cognition and planning helpers layered over the kernel.
46#[cfg(feature = "cognition")]
47pub mod cognition {
48 pub use rain_engine_cognition::*;
49}
50
51/// WASM skill execution and capability hosts.
52#[cfg(feature = "wasm")]
53pub mod wasm {
54 pub use rain_engine_wasm::*;
55}
56
57/// Runtime helpers, bootstrap config, and HTTP integration surface.
58#[cfg(feature = "runtime")]
59pub mod runtime {
60 pub use crate::server::ServerBuilder;
61 pub use rain_engine_runtime::*;
62}
63
64/// Runtime HTTP client for embedding or testing runtime-backed deployments.
65#[cfg(feature = "client")]
66pub mod client {
67 pub use rain_engine_client::*;
68}
69
70/// Provider integrations.
71pub mod providers {
72 #[cfg(feature = "provider-openai")]
73 pub use rain_engine_openai::*;
74 #[cfg(feature = "provider-gemini")]
75 pub use rain_engine_provider_gemini::*;
76}
77
78/// Durable and coordination store integrations.
79pub mod stores {
80 #[cfg(feature = "store-pg")]
81 pub use rain_engine_store_pg::*;
82 #[cfg(feature = "store-sqlite")]
83 pub use rain_engine_store_sqlite::*;
84 #[cfg(feature = "store-valkey")]
85 pub use rain_engine_store_valkey::*;
86}
87
88/// Channel adapters that translate external messages into runtime events.
89#[cfg(feature = "channels")]
90pub mod channels {
91 pub use rain_engine_channels::*;
92}
93
94/// Common top-level kernel re-exports for quickstarts.
95pub use rain_engine_core::{
96 AdvanceRequest, AdvanceResult, AgentAction, AgentEngine, AgentTrigger, ApprovalDecision,
97 AttachmentRef, CorrelationId, EngineOutcome, MultimodalPayload, ProcessRequest, WakeId,
98};
99
100#[cfg(feature = "client")]
101pub use rain_engine_client::RainEngineClient as Client;
102
103#[cfg(feature = "runtime")]
104pub use server::ServerBuilder;