executor-core
A flexible task executor abstraction layer for Rust async runtimes.
Overview
executor-core
provides a unified interface for spawning and managing async tasks across different executor backends. Write once, run on any supported async runtime.
Features
- Runtime agnostic - Works with
async-executor
,tokio
, and custom executors - Zero-cost abstractions - Compiles to direct executor calls
- Panic handling - Graceful error recovery from task panics
- No-std support - Works in embedded environments
Quick Start
Add to your Cargo.toml
:
[]
= "0.1"
Basic usage:
use spawn;
async
Error Handling
use ;
let task = spawn;
match task.result.await
Feature Flags
default-async-executor
(default) - Useasync-executor
as global executordefault-tokio
- Usetokio
as global executorasync-executor
- Enableasync-executor
backendtokio
- Enabletokio
backendstd
- Enable standard library support
License
Licensed under the MIT License.