async_compatibility_layer/
lib.rs

1//! Async compatibility layer
2//! meant to control abstractions between tokio and async_std
3//! with a feature flag toggle
4//! while exposing the same interface for general consumption between both
5
6#[cfg(all(async_executor_impl = "async-std", async_executor_impl = "tokio"))]
7std::compile_error!(
8    "Both cfg options \"async-std\" and \"tokio\" must not be concurrently enabled for this crate."
9);
10
11/// abstraction over both `tokio` and `async-std`, making it possible to use either based on a feature flag
12#[cfg(not(async_executor_impl = "tokio"))]
13#[path = "art/async-std.rs"]
14pub mod art;
15
16/// abstraction over both `tokio` and `async-std`, making it possible to use either based on a feature flag
17#[cfg(async_executor_impl = "tokio")]
18#[path = "art/tokio.rs"]
19pub mod art;
20
21pub mod channel;
22
23pub mod async_primitives;
24
25#[cfg(feature = "logging-utils")]
26pub mod logging;