#tokio #pipe #async

tokio-pipe

Asynchronous pipe(2) library using tokio

16 releases

0.2.12 Jun 26, 2022
0.2.11 Mar 2, 2022
0.2.10 Jan 25, 2022
0.2.9 Dec 29, 2021
0.1.3 Jul 4, 2020

#204 in Asynchronous

Download history 109198/week @ 2025-10-06 94381/week @ 2025-10-13 96051/week @ 2025-10-20 91453/week @ 2025-10-27 85688/week @ 2025-11-03 79187/week @ 2025-11-10 131822/week @ 2025-11-17 59401/week @ 2025-11-24 71757/week @ 2025-12-01 51706/week @ 2025-12-08 45693/week @ 2025-12-15 24192/week @ 2025-12-22 21668/week @ 2025-12-29 46415/week @ 2026-01-05 37590/week @ 2026-01-12 26308/week @ 2026-01-19

133,434 downloads per month
Used in 20 crates (11 directly)

MIT/Apache

35KB
844 lines

tokio-pipe

tokio-pipe dependency status

Asynchronous pipe(2) library using tokio.

Example

use tokio::prelude::*;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let (mut r, mut w) = tokio_pipe::pipe()?;

    w.write_all(b"HELLO, WORLD!").await?;

    let mut buf = [0; 16];
    let len = r.read(&mut buf[..]).await?;

    assert_eq!(&buf[..len], &b"HELLO, WORLD!"[..]);
    Ok(())
}

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

~2–12MB
~76K SLoC