ringkernel_cpu/lib.rs
1//! CPU Backend for RingKernel
2//!
3//! This crate provides a CPU-based implementation of the RingKernel runtime,
4//! primarily used for testing and as a fallback when no GPU is available.
5//!
6//! # Features
7//!
8//! - Full implementation of the RingKernelRuntime trait
9//! - Simulates GPU execution using async tasks
10//! - Supports all kernel lifecycle operations
11//! - Useful for unit testing and development
12//!
13//! # Example
14//!
15//! ```ignore
16//! use ringkernel_cpu::CpuRuntime;
17//! use ringkernel_core::runtime::{RuntimeBuilder, Backend};
18//!
19//! #[tokio::main]
20//! async fn main() {
21//! let runtime = CpuRuntime::new().await.unwrap();
22//! let kernel = runtime.launch("my_kernel", Default::default()).await.unwrap();
23//! kernel.activate().await.unwrap();
24//! }
25//! ```
26
27#![warn(missing_docs)]
28
29mod kernel;
30mod memory;
31mod runtime;
32
33pub use kernel::CpuKernel;
34pub use memory::CpuBuffer;
35pub use runtime::CpuRuntime;
36
37/// Prelude for convenient imports.
38pub mod prelude {
39 pub use crate::CpuKernel;
40 pub use crate::CpuRuntime;
41}