#async-io #future #async

no-std futures-lite

Futures, streams, and async I/O combinators

37 releases (stable)

new 2.5.0 Nov 8, 2024
2.3.0 Mar 17, 2024
2.1.0 Dec 2, 2023
2.0.1 Nov 6, 2023
0.1.10 Jul 27, 2020

#131 in Asynchronous

Download history 1052572/week @ 2024-07-19 1051411/week @ 2024-07-26 1046515/week @ 2024-08-02 1132431/week @ 2024-08-09 1125549/week @ 2024-08-16 1152602/week @ 2024-08-23 1108707/week @ 2024-08-30 1172295/week @ 2024-09-06 1056512/week @ 2024-09-13 1199406/week @ 2024-09-20 1157264/week @ 2024-09-27 1149594/week @ 2024-10-04 1083857/week @ 2024-10-11 1144966/week @ 2024-10-18 1147029/week @ 2024-10-25 928560/week @ 2024-11-01

4,509,940 downloads per month
Used in 6,636 crates (516 directly)

Apache-2.0 OR MIT

210KB
4K SLoC

futures-lite

Build License Cargo Documentation

A lightweight async prelude.

This crate is a subset of futures that compiles an order of magnitude faster, fixes minor warts in its API, fills in some obvious gaps, and removes almost all unsafe code from it.

In short, this crate aims to be more enjoyable than futures but still fully compatible with it.

Examples

use futures_lite::future;

fn main() {
    future::block_on(async {
        println!("Hello world!");
    })
}

License

Licensed under either of

at your option.

Contribution

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.

Dependencies

~150KB