tinyio

Crates.iotinyio
lib.rstinyio
version0.1.0
sourcesrc
created_at2024-04-26 05:54:26.002616
updated_at2024-04-26 05:54:26.002616
descriptionA tiny Rust concurrency runtime library.
homepage
repositoryhttps://github.com/levinion/tinyio
max_upload_size
id1221083
size25,535
Maruka (levinion)

documentation

https://docs.rs/tinyio

README

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());
}
Commit count: 11

cargo fmt