oxigdal_edge/lib.rs
1//! # OxiGDAL Edge Computing Platform
2//!
3//! `oxigdal-edge` provides edge computing capabilities for geospatial data processing
4//! with a focus on:
5//! - Minimal binary footprint for embedded deployment
6//! - Offline-first architecture with local caching
7//! - Edge-to-cloud synchronization with conflict resolution
8//! - Resource-constrained device support
9//!
10//! ## Features
11//!
12//! - **Edge Runtime**: Lightweight runtime optimized for resource-constrained devices
13//! - **Synchronization**: Edge-to-cloud sync protocols with conflict resolution
14//! - **CRDT-based Conflict Resolution**: Automatic conflict resolution for distributed nodes
15//! - **Edge Compression**: Optimized compression for bandwidth-limited environments
16//! - **Local Caching**: Offline-first caching strategy
17//! - **Resource Management**: Memory and CPU management for constrained devices
18//!
19//! ## Example
20//!
21//! ```rust,no_run
22//! use oxigdal_edge::{EdgeRuntime, EdgeConfig};
23//!
24//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
25//! // Create edge runtime with minimal footprint
26//! let config = EdgeConfig::minimal();
27//! let runtime = EdgeRuntime::new(config).await?;
28//!
29//! // Process data locally with caching
30//! // Sync with cloud when connection available
31//! # Ok(())
32//! # }
33//! ```
34
35#![cfg_attr(docsrs, feature(doc_cfg))]
36#![warn(missing_docs)]
37#![deny(unsafe_code)]
38
39pub mod cache;
40pub mod compression;
41pub mod conflict;
42pub mod error;
43pub mod resource;
44pub mod runtime;
45pub mod sync;
46
47pub use cache::{Cache, CacheConfig, CacheEntry, CachePolicy};
48pub use compression::{AdaptiveCompressor, CompressionLevel, CompressionStrategy, EdgeCompressor};
49pub use conflict::{ConflictResolver, CrdtMap, CrdtSet, VectorClock};
50pub use error::{EdgeError, Result};
51pub use resource::{ResourceConstraints, ResourceManager, ResourceMetrics};
52pub use runtime::{EdgeConfig, EdgeRuntime, RuntimeMode};
53pub use sync::{SyncManager, SyncProtocol, SyncStatus, SyncStrategy};
54
55/// Edge computing version
56pub const VERSION: &str = env!("CARGO_PKG_VERSION");
57
58/// Default cache size for edge devices (10 MB)
59pub const DEFAULT_CACHE_SIZE: usize = 10 * 1024 * 1024;
60
61/// Default sync interval (5 minutes)
62pub const DEFAULT_SYNC_INTERVAL_SECS: u64 = 300;
63
64/// Maximum memory usage for edge runtime (50 MB)
65pub const MAX_MEMORY_USAGE: usize = 50 * 1024 * 1024;