async-std - 异步的 Rust 标准库
Apache/MIT
跨平台
Rust
软件简介
async-std 是 Rust 标准库的异步版本。
入门
首先在Cargo.toml
添加如下内容:
[dependencies]
async-std = "0.99"
或者使用 cargo add :
$ cargo add async-std
Hello world
#![feature(async_await)]
use async_std::task;
fn main() {
task::block_on(async {
println!("Hello, world!");
})
}