Expand description
Runtime abstraction layer for gatel.
Provides a common interface over different async runtimes. The default
implementation uses Tokio. When the monoio feature is enabled, a
monoio-based implementation is available for Linux systems with io_uring
support.
§Architecture
The abstraction is intentionally thin — it wraps the most commonly used runtime operations (spawning tasks, sleeping, TCP operations) behind feature-gated implementations. Business logic uses these wrappers instead of calling tokio/monoio directly, making it possible to switch runtimes at compile time.
§Usage
ⓘ
use gatel_core::runtime;
// Spawn a background task
runtime::spawn(async { /* ... */ });
// Sleep
runtime::sleep(Duration::from_secs(1)).await;Structs§
- Runtime
Info - Runtime information and capabilities.