Reputation: 668
There is a feature flag on async-std: tokio1
async-std = { version = "1", features = ["tokio1", "attributes"] }
Then I can use async_std::main on tokio stuff:
#[async_std::main]
async fn main() -> std::io::Result<()> {
// some tokio dependent async libraries run here
Ok(())
}
Basically it makes tokio dependent crates run with async-std crate.
I have two questions:
Upvotes: 2
Views: 414