toki-no

Crates.iotoki-no
lib.rstoki-no
version0.3.0
created_at2025-09-16 12:07:28.732303+00
updated_at2025-09-17 11:36:26.969669+00
descriptionA minimal and fast async runtime, written in pure Rust.
homepage
repositoryhttps://github.com/johvnik/toki-no
max_upload_size
id1841550
size9,426
(johvnik)

documentation

README

toki-no

Crates.io Docs.rs Tests License

時の... of time...

toki-no is a minimal and fast async runtime for Rust.

Overview

toki-no is an exploration into the fundamentals of asynchronous execution, built from the ground up in pure Rust. It provides a lean executor and I/O reactor, focusing on simplicity and performance.

The core goal is to provide a runtime that is easy to understand, has a minimal API, and maintains low overhead.

Features

  • Minimal & Lightweight: A small API surface and a lean codebase.
  • Fast & Efficient: Designed for low-overhead asynchronous execution.
  • I/O Driven: Powered by a modern event-polling mechanism.
  • Pure Rust: Built with safe, modern Rust.

Usage

Add toki-no to your Cargo.toml:

use std::time::Duration;

#[toki_no::main]
async fn main() {
    println!("Hello from an async world!");

    // Spawn a concurrent task
    let handle = toki_no::spawn(async {
        println!("Task is running...");
        toki_no::sleep(Duration::from_secs(1)).await;
        "Task finished!"
    });

    println!("Main function continues...");

    let result = handle.await;
    println!("Result from spawned task: {}", result);
}
Commit count: 14

cargo fmt