compio-compat 0.1.0-rc.1

Compatibility layer for compio to work with various async runtimes.
Documentation

compio-compat

MIT licensed crates.io docs.rs Check Test

Run compio in other async runtimes.

Usage

Use compio::compat re-exported from compio crate.

use compio::compat::{RuntimeCompat, TokioAdapter};

#[tokio::main]
async fn main() {
    // Create a compio runtime:
    let runtime = compio::runtime::Runtime::new().unwrap();
    // Create the compat layer:
    let runtime = RuntimeCompat::<TokioAdapter>::new(runtime).unwrap();
    // Execute your future:
    runtime.execute(async {
        // Run compio-specific code
    }).await;
}