rio_rt

Crates.iorio_rt
lib.rsrio_rt
version0.1.0-alpha.2
sourcesrc
created_at2022-10-05 00:02:44.020102
updated_at2022-10-06 22:57:49.865705
descriptionA minimal async runtime with an experimental ambition to be an portable and interoperable async runtime for Rust
homepagehttps://github.com/vincenzopalazzo/rio
repositoryhttps://github.com/vincenzopalazzo/rio.git
max_upload_size
id680227
size8,956
Vincenzo Palazzo (vincenzopalazzo)

documentation

README

Rio Runtime

Code Example

This is a very monkey example just to show how to use Rio API

#![feature(async_fn_in_trait)]
#![feature(associated_type_defaults)]
use log::{debug, info};
use rio_rt::runitime as rio;
use surf;

pub(crate) mod extractor;
mod github;

use extractor::Extractor;

async fn run(extractor: &impl extractor::Extractor<Output = String>) -> Result<(), surf::Error> {
    let content = extractor.search_new().await?;
    info!("{}", content);
    Ok(())
}

fn main() {
    env_logger::init();
    debug!("Here we go, we are all good");
    rio::block_on(async {
        let github = github::GithubExtractor::new();
        run(&github).await.unwrap()
    });
    rio::wait();
}
Commit count: 33

cargo fmt