#io #io-write #io-read #tokio #buffer #future #async

no-std channels-io

Async agnostic/Sync IO & buffer management abstractions

3 unstable releases

new 0.2.0 Jun 20, 2024
0.1.1 Jun 13, 2024
0.1.0 Jun 7, 2024

#548 in Asynchronous

Download history 117/week @ 2024-06-02 136/week @ 2024-06-09 159/week @ 2024-06-16

412 downloads per month
Used in channels

MIT license

57KB
1.5K SLoC

channels-io

This crate contains generic IO traits that abstract over little implementation differences of different libraries. With this crate it is possible to write IO code that is agnostic over sync/async operation and, if using async, over the runtime that is used. Additionally, this crate implements a generic interface for buffers, a bit like bytes but with some subtle differences.

Features

Feature Description
alloc Enable implementations for alloc structures (Box, Vec, ...)
std Abstract over std::io::Read and std::io::Write
tokio Abstract over tokio::io::AsyncRead and tokio::io::AsyncWrite
futures Abstract over futures::AsyncRead and futures::AsyncWrite
core2 Abstract over core2::io::Read and core2::io::Write
smol Abstract over smol::io::AsyncRead and smol::io::AsyncWrite

Note: The API of this crate is not final and may change at any time without necessarily a major version bump. If you must depend on it pin down the full version of the crate to avoid future incompatibilities.

Dependencies

~0–10MB
~98K SLoC