untokio 0.2.1

Automatically create tokio runtimes
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use tokio02 as tokio;

mod library {
    use reqwest010 as reqwest; // relies on tokio 0.2

    pub async fn download() -> Result<String, reqwest::Error> {
        untokio::v02::spawn(async {
            reqwest::get("http://example.com/").await?.text().await
        }).await.unwrap()
    }
}

#[tokio02::main]
async fn main() {
    println!("{}", library::download().await.unwrap());
}