#async-std #async-await #async

no-std tokio-async-std

An async-std that can fit into tokio ecosystem straight ahead

6 releases (stable)

1.5.3 Apr 16, 2020
1.5.2 Mar 28, 2020
0.5.1 Mar 25, 2020

#1865 in Asynchronous

Download history 78/week @ 2024-03-11 81/week @ 2024-03-18 141/week @ 2024-03-25 93/week @ 2024-04-01 72/week @ 2024-04-08 118/week @ 2024-04-15 102/week @ 2024-04-22 48/week @ 2024-04-29 71/week @ 2024-05-06 75/week @ 2024-05-13 44/week @ 2024-05-20 56/week @ 2024-05-27 60/week @ 2024-06-03 25/week @ 2024-06-10 17/week @ 2024-06-17 39/week @ 2024-06-24

144 downloads per month
Used in tokio-async-attributes

MIT license

755KB
15K SLoC

tokio-async-std

Welp, it's an async runtime that provides exact same async-std APIs in the front with tokio task executor in the back.

What does it have?

Above has said it all. This is a fork of async-std but replace the executor with tokio's. Everything is working and feels almost exactly the same, but there are still some differences. Basically when it comes to task spawning and runtime configuration, it will behave as how tokio presents. So beware on that. Otherwise, it does feels like a drop-in async runtime can use for.

Is it worth it?

Someone asked for it, so here it is. But frankly speaking, both tokio and async-std already have comprehensive functionalities. Just choose the one you are fond of shouldn't get anything wrong. This is the one for people who really really really want to use interface of async-std but also need to use crates from tokio ecosystem.

How do I use it?

Add tokio-async-std to Cargo.toml as dependency. The main and minor version follow the same semver from async-std. Then simply put import it and everything else should feel like the same. The library name is also same.

use async_std;

Dependencies

~5MB
~79K SLoC