rio_rt 0.1.0-alpha.2

A minimal async runtime with an experimental ambition to be an portable and interoperable async runtime for Rust
Documentation
  • Coverage
  • 100%
    6 out of 6 items documented0 out of 3 items with examples
  • Size
  • Source code size: 8.86 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.21 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • vincenzopalazzo/rio
    30 4 4
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • vincenzopalazzo

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