luminal/runtime/
mod.rs

1//! Luminal Runtime Core Implementation
2//!
3//! This module provides the core components of the Luminal async runtime,
4//! designed as a DLL-boundary safe alternative to tokio with similar 
5//! performance characteristics and API compatibility.
6//!
7//! ## Key Components
8//!
9//! - `Runtime`: Main runtime for executing async tasks
10//! - `Handle`: Lightweight handle to a Runtime
11//! - `JoinHandle`: Handle for awaiting the completion of async tasks
12//! - `Executor`: Core task execution engine
13//! - `Task`: Individual async task representation
14//!
15//! ## Module Structure
16//!
17//! The runtime is organized into several submodules:
18//! - `error`: Error types specific to task execution
19//! - `executor`: Core execution engine implementation
20//! - `handle`: Runtime handle implementation
21//! - `join_handle`: Join handle implementation
22//! - `runtime`: Main runtime implementation
23//! - `task`: Task representation
24//! - `worker`: Worker thread implementation
25//! - `waker`: Custom waker implementation
26
27mod error;
28#[cfg(feature = "std")]
29mod executor;
30#[cfg(not(feature = "std"))]
31mod simple_executor;
32mod handle;
33mod join_handle;
34mod runtime;
35mod task;
36#[cfg(feature = "std")]
37mod worker;
38mod waker;
39
40// Re-export public components
41pub use self::error::TaskError;
42#[cfg(feature = "std")]
43pub use self::executor::Executor;
44#[cfg(not(feature = "std"))]
45pub use self::simple_executor::SimpleExecutor as Executor;
46pub use self::handle::Handle;
47pub use self::join_handle::JoinHandle;
48pub use self::runtime::Runtime;
49pub use self::task::TaskId;
50
51// Global convenience functions (std only)
52#[cfg(feature = "std")]
53pub use self::runtime::{spawn, block_on};