3 releases (breaking)

Uses new Rust 2024

0.2.0 Jan 29, 2026
0.1.0 Jan 21, 2026
0.0.1 Dec 27, 2025

#2232 in Asynchronous

Download history 48/week @ 2026-01-29 24/week @ 2026-02-05 106/week @ 2026-02-19

178 downloads per month
Used in 3 crates (via nio)

Apache-2.0

45KB
1K SLoC

Nio Task

Nio Task is a low-level task abstraction designed for building executors. It gives you explicit control over how and when a task is polled and rescheduled.

Crates.io Documentation License: Apache-2.0

Example

Add this to your Cargo.toml file:

[dependencies]
nio-task = "0.1"
use nio_task::{Status, Task};

let metadata = 0;
let future = async {};
let scheduler = |task| {
    // ...
};

let (task, join) = Task::new_with(metadata, future, scheduler);

match task.poll() {
    Status::Yielded(task) => task.schedule(),
    Status::Pending => {}
    Status::Complete(_metadata) => {}
}

No runtime deps