async-std- 异步的 Rust 标准库
Rust 常用工具包
访问GitHub主页
共0Star
详细介绍
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!");
})
}
推荐源码
-
26 Star
-
10577 Star
-
0 Star
-
109 Star
-
2273 Star
-
0 Star
-
16 Star