<div align="center">
<a href='https://compio.rs'>
<img height="150" src="https://github.com/compio-rs/compio-logo/raw/refs/heads/master/generated/colored-with-text.svg">
</a>
</div>
---
# compio-compat
[](https://github.com/compio-rs/compio/blob/master/LICENSE)
[](https://crates.io/crates/compio-compat)
[](https://docs.rs/compio-compat)
[](https://github.com/compio-rs/compio/actions/workflows/ci_check.yml)
[](https://github.com/compio-rs/compio/actions/workflows/ci_test.yml)
Run compio in other async runtimes.
## Usage
Use `compio::compat` re-exported from `compio` crate.
```rust
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;
}
```