#run-time #non-blocking #future #io #async

tinyio

A tiny Rust concurrency runtime library

1 unstable release

0.1.0 Apr 26, 2024

#2248 in Asynchronous

MIT license

18KB
295 lines

TinyIO

A tiny Rust concurrency runtime library.

Example

Print in parallel

#[tinyio::main]
async fn main() {
    for i in 0..10 {
        tinyio::spawn(async move {
            println!("{}", i);
        })
    }
}

Make HTTP/HTTPS requests

#[tinyio::main]
async fn main() {
    let mut res =
        isahc::get_async("https://raw.githubusercontent.com/levinion/tinyio/main/README.md")
            .await
            .unwrap();
    println!("{}", res.text().await.unwrap());
}

Dependencies

~0.6–1.3MB
~26K SLoC