kotoba_main/lib.rs
1//! # Kotoba: Core Graph Processing System
2//!
3//! A comprehensive graph processing platform featuring GP2-based graph rewriting,
4//! complete Event Sourcing, ISO GQL-compliant queries, MVCC+Merkle persistence,
5//! and distributed execution using the Port/Adapter (Hexagonal) Architecture.
6//!
7//! ## Architecture Overview
8//!
9//! Kotoba is built with the **Port/Adapter (Hexagonal) Architecture**:
10//!
11//! - **🎯 Application Layer**: Business logic (Event Sourcing, Graph Queries, Rewriting)
12//! - **🔧 Infrastructure Layer**: Storage adapters (RocksDB, Redis, In-Memory)
13//! - **🏛️ Presentation Layer**: CLI, HTTP APIs, Web interfaces
14//!
15//! ## Key Features
16//!
17//! - **Complete Event Sourcing**: Immutable events, projections, materialized views
18//! - **ISO GQL-compliant Queries**: Industry-standard graph query language
19//! - **Port/Adapter Pattern**: Clean separation of business logic and infrastructure
20//! - **Multiple Storage Backends**: RocksDB, Redis, In-Memory implementations
21//! - **Graph Rewriting**: GP2-based graph transformations
22//! - **Distributed Execution**: Multi-node coordination and consensus
23//!
24//! ## Usage
25//!
26//! ```rust
27//! use kotoba::*;
28//!
29//! // Create storage adapter
30//! let storage = kotoba_storage::MemoryAdapter::new();
31//!
32//! // Create event stream
33//! let event_stream = kotoba_event_stream::EventStream::new(storage);
34//!
35//! // Execute GQL query
36//! let result = kotoba_query_engine::execute_gql("MATCH (n) RETURN n", &event_stream).await;
37//! ```
38//!
39//! ## Crate Organization
40//!
41//! - **000-core**: Foundation types, error handling, CID
42//! - **100-storage**: Storage adapters and persistence
43//! - **200-application**: Business logic and domain services
44//! - **300-workflow**: Workflow orchestration
45//! - **400-language**: Language support (Jsonnet, KotobaScript)
46//! - **500-services**: HTTP servers and APIs
47//! - **600-deployment**: Deployment and scaling
48//! - **900-tools**: Development tools and CLI
49
50// Re-export main components for convenience (when available)
51// Note: These re-exports are optional and will only work if the corresponding crates are available
52// and properly implemented in the current build configuration.
53
54// Core error type
55pub use kotoba_errors::KotobaError;
56
57// pub use kotoba_core as core; // Temporarily disabled - may not be available
58// pub use kotoba_storage as storage; // Temporarily disabled - may not be available
59// pub use kotoba_event_stream as event_stream; // Temporarily disabled - may not be available
60// pub use kotoba_query_engine as query_engine; // Temporarily disabled - may not be available
61// pub use kotoba_execution as execution; // Temporarily disabled - may not be available
62// pub use kotoba_rewrite as rewrite; // Temporarily disabled - may not be available
63// pub use kotoba_routing as routing; // Temporarily disabled - may not be available
64// pub use kotoba_state_graph as state_graph; // Temporarily disabled - may not be available
65// pub use kotoba_jsonnet as jsonnet; // Temporarily disabled - may not be available
66// pub use kotoba_kotobas as kotobas; // Temporarily disabled - may not be available
67
68// Version information
69pub const VERSION: &str = env!("CARGO_PKG_VERSION");
70pub const NAME: &str = "Kotoba";
71pub const DESCRIPTION: &str = "Core Graph Processing System (GP2 + Event Sourcing + ISO GQL) - Port/Adapter Architecture";
72
73// Public modules