//! CPU-GPU memory coordination for the memkit ecosystem.
//!
//! `memkit-co` bridges CPU memory management ([`memkit`]) with GPU memory
//! management ([`memkit_gpu`]), providing unified APIs for efficient
//! CPU-to-GPU data transfers.
//!
//! # Overview
//!
//! The coordinator handles:
//! - Frame-based CPU allocations with automatic GPU upload
//! - Staging buffer pooling and reuse
//! - Transfer batching and scheduling
//! - Double/triple buffering for frame pipelines
//!
//! # Quick Start
//!
//! ```rust,ignore
//! use memkit_co::{MkCoordinator, CoordinatorConfig};
//! use memkit_gpu::DummyBackend;
//!
//! let coordinator = MkCoordinator::new(DummyBackend::new(), CoordinatorConfig::default());
//!
//! // Frame-based workflow
//! coordinator.begin_frame();
//! let data = coordinator.frame_alloc::<[f32; 4]>();
//! coordinator.end_frame().unwrap();
//! ```

mod config;
mod coordinator;
mod frame;
mod scheduler;
mod staging;
mod sync;

/// Bevy-compatible GPU coordinator (thread-safe).
pub mod bevy;

pub use config::{CoordinatorConfig, BufferingMode};
pub use coordinator::MkCoordinator;
pub use frame::FrameContext;
pub use scheduler::TransferScheduler;
pub use staging::StagingPool;
pub use sync::{TransferFence, FenceStatus};

// Re-export commonly used types from dependencies
pub use memkit::{MkFastArena, MkUltraArena};
pub use memkit_gpu::{MkGpu, MkGpuBackend, MkBufferUsage, MkMemoryType};
