toki-no 0.3.0

A minimal and fast async runtime, written in pure Rust.
Documentation
  • Coverage
  • 100%
    7 out of 7 items documented0 out of 5 items with examples
  • Size
  • Source code size: 8.92 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.54 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • johvnik/toki-no
    2 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • johvnik

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);
}