#futures #select #macro #macros #preview

futures-select-macro-preview

The select! macro for waiting on multiple different Futures at once and handling the first one to complete

9 releases

0.3.0-alpha.19 Sep 26, 2019
0.3.0-alpha.18 Aug 9, 2019
0.3.0-alpha.17 Jul 3, 2019
0.3.0-alpha.16 May 10, 2019
0.3.0-alpha.11 Dec 27, 2018
Download history 297/week @ 2021-02-16 329/week @ 2021-02-23 261/week @ 2021-03-02 178/week @ 2021-03-09 174/week @ 2021-03-16 227/week @ 2021-03-23 150/week @ 2021-03-30 227/week @ 2021-04-06 274/week @ 2021-04-13 257/week @ 2021-04-20 247/week @ 2021-04-27 187/week @ 2021-05-04 174/week @ 2021-05-11 203/week @ 2021-05-18 173/week @ 2021-05-25 190/week @ 2021-06-01

984 downloads per month

MIT/Apache

11KB
230 lines

futures-rs

Zero-cost asynchronous programming in Rust

Build Status Crates.io Rustc Version

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"

Now, you can use futures-rs:

use futures::future::Future;

The current futures-rs requires Rust 1.41 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

This project is licensed under either of

at your option.

Contribution

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

Dependencies

~370–800KB
~20K SLoC