30 releases

0.3.30 Dec 24, 2023
0.3.29 Oct 26, 2023
0.3.28 Mar 30, 2023
0.3.25 Oct 20, 2022
0.3.1 Nov 7, 2019

#37 in Procedural macros

Download history 1298604/week @ 2023-10-29 1316399/week @ 2023-11-05 1389382/week @ 2023-11-12 1168639/week @ 2023-11-19 1305735/week @ 2023-11-26 1334076/week @ 2023-12-03 1309333/week @ 2023-12-10 1199011/week @ 2023-12-17 765935/week @ 2023-12-24 1137919/week @ 2023-12-31 1426195/week @ 2024-01-07 1491815/week @ 2024-01-14 1534601/week @ 2024-01-21 1720204/week @ 2024-01-28 1572287/week @ 2024-02-04 1519181/week @ 2024-02-11

6,443,103 downloads per month
Used in 1,114 crates (3 directly)

MIT/Apache

27KB
542 lines

futures-rs

Zero-cost asynchronous programming in Rust

Build Status crates.io

Documentation | Website

futures-rs is a library providing the foundations for asynchronous programming in Rust. It includes key trait definitions like Stream, as well as utilities like join!, select!, and various futures combinator methods which enable expressive asynchronous control flow.

Usage

Add this to your Cargo.toml:

[dependencies]
futures = "0.3"

The current futures requires Rust 1.56 or later.

Feature std

Futures-rs works without the standard library, such as in bare metal environments. However, it has a significantly reduced API surface. To use futures-rs in a #[no_std] environment, use:

[dependencies]
futures = { version = "0.3", default-features = false }

License

Licensed under either of Apache License, Version 2.0 or MIT license 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.


lib.rs:

The futures-rs procedural macro implementations.

Dependencies

~315–750KB
~18K SLoC