Skip to content
Async version of the Rust standard library
Rust Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
benches remove async_await feature gate Aug 21, 2019
ci Restore Version Sort (#121) Aug 28, 2019
docs Merge #224 Sep 22, 2019
examples Clean up the fs module and a few other places Sep 13, 2019
src Merge pull request #211 from tirr-c/stream-extend Sep 22, 2019
.gitignore Initial commit Aug 8, 2019
.travis.yml Re-export IO traits from futures Sep 21, 2019 prepare v0.99.6 Sep 19, 2019 Create Aug 12, 2019
Cargo.toml prepare v0.99.6 Sep 19, 2019
LICENSE-APACHE Initial commit Aug 8, 2019
LICENSE-MIT Initial commit Aug 8, 2019 Update Sep 18, 2019
bors.toml Add bors.toml Sep 4, 2019
rustfmt.toml Add rustfmt config Aug 8, 2019

Async version of the Rust standard library

Build Status License Cargo Documentation chat

This crate provides an async version of std. It provides all the interfaces you are used to, but in an async version and ready for Rust's async/await syntax.


async-std comes with extensive API documentation and a book.


Add the following lines to your Cargo.toml:

async-std = "0.99"

Or use cargo add if you have it installed:

$ cargo add async-std

Hello world

use async_std::task;

fn main() {
    task::block_on(async {
        println!("Hello, world!");

Low-Friction Sockets with Built-In Timeouts

use std::time::Duration;

use async_std::{

async fn get() -> io::Result<Vec<u8>> {
    let mut stream = TcpStream::connect("").await?;
    stream.write_all(b"GET /index.html HTTP/1.0\r\n\r\n").await?;

    let mut buf = vec![];

    io::timeout(Duration::from_secs(5), async {
        stream.read_to_end(&mut buf).await?;

fn main() {
    task::block_on(async {
        let raw_response = get().await.expect("request");
        let response = String::from_utf8(raw_response)
            .expect("utf8 conversion");
        println!("received: {}", response);


async-std is strongly commited to following semver. This means your code won't break unless you decide to upgrade.

However every now and then we come up with something that we think will work great for async-std, and we want to provide a sneak-peek so you can try it out. This is what we call "unstable" features. You can try out the unstable features by enabling the unstable feature in your Cargo.toml file:

version = "0.99"
features = ["unstable"]

Just be careful when using these features, as they may change between versions.

Take a look around

Clone the repo:

git clone && cd async-std

Generate docs:

cargo doc --features --open

Check out the examples. To run an example:

cargo run --example hello-world


See our contribution document.


Licensed under either of

at your option.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

You can’t perform that action at this time.