aimdb_core/
lib.rs

1//! AimDB Core Database Engine
2//!
3//! Type-safe, async in-memory database for real-time data synchronization
4//! across MCU → edge → cloud environments.
5//!
6//! # Architecture
7//!
8//! - **Type-Safe Records**: `TypeId`-based routing, no string keys
9//! - **Unified API**: Single `Database<A>` type for all operations
10//! - **Runtime Agnostic**: Works with Tokio (std) or Embassy (embedded)
11//! - **Producer-Consumer**: Built-in typed message passing
12//!
13//! See examples in the repository for usage patterns.
14
15#![cfg_attr(not(feature = "std"), no_std)]
16
17pub mod buffer;
18pub mod builder;
19pub mod connector;
20pub mod context;
21pub mod database;
22mod error;
23pub mod ext_macros;
24#[cfg(feature = "std")]
25pub mod remote;
26pub mod time;
27pub mod transport;
28pub mod typed_api;
29pub mod typed_record;
30
31// Public API exports
32pub use context::RuntimeContext;
33pub use error::{DbError, DbResult};
34
35// Runtime trait re-exports from aimdb-executor
36// These traits define the platform-specific execution, timing, and logging capabilities
37pub use aimdb_executor::{
38    ExecutorError, ExecutorResult, Logger, Runtime, RuntimeAdapter, RuntimeInfo, Spawn, TimeOps,
39};
40
41// Database implementation exports
42pub use database::Database;
43
44// Producer-Consumer Pattern exports
45pub use builder::{AimDb, AimDbBuilder};
46pub use transport::{Connector, ConnectorConfig, PublishError};
47pub use typed_api::{Consumer, Producer, RecordRegistrar, RecordT};
48pub use typed_record::{AnyRecord, AnyRecordExt, TypedRecord};
49
50// Connector Infrastructure exports
51pub use connector::{ConnectorClient, ConnectorLink, ConnectorUrl, SerializeError};