A even smaller tokio
Features
- Basic task spawning and execution
- Asynchronous runtime with a simple event loop
- Custom
Futureimplementation for delays - Thread-safe task scheduling using channels
Usage
To use mini-tokio in your Rust project:
- Create a new
Runtimeinstance - Spawn tasks using the
block_onfunction - Or use the mini_tokio::main attribute
Examples:
use Runtime;
let rt = new;
mini_tokio.block_on;
async
Note
This is a minimal implementation for educational purposes and is not intended for production use. For real-world applications, consider using the full Tokio runtime or other production-ready async runtimes.