| Crates.io | async-compatibility-layer |
| lib.rs | async-compatibility-layer |
| version | 1.2.1 |
| created_at | 2024-04-02 15:54:51.829861+00 |
| updated_at | 2024-07-10 17:35:29.349812+00 |
| description | an abstraction layer for using both async-std and tokio |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1193678 |
| size | 76,495 |
This crate exports four things:
By default the async-std executor and channels are used.
To use tokio:
RUSTFLAGS='--cfg async_executor_impl="tokio" --cfg async_channel_impl="tokio"' cargo build
async_executor_impl may be either tokio or async-std. async_channel_impl
may be either tokio, async-std, or flume.
Note that using tokio channels requires tokio to be the runtime.