No description
  • Rust 99.6%
  • Shell 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Daniel Baumann b3601d1bd8
Releasing fastforward version 1.11.1-1~ffwd13+u1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2026-08-04 18:56:40 +02:00
.github/workflows Adding upstream version 1.10.1. 2026-08-04 18:55:53 +02:00
benches Adding upstream version 1.10.1. 2026-08-04 18:55:53 +02:00
ci Merging upstream version 1.11.1. 2026-08-04 18:56:33 +02:00
debian Releasing fastforward version 1.11.1-1~ffwd13+u1. 2026-08-04 18:56:40 +02:00
src Merging upstream version 1.11.1. 2026-08-04 18:56:33 +02:00
tests Merging upstream version 1.11.1. 2026-08-04 18:56:33 +02:00
.cargo_vcs_info.json Merging upstream version 1.11.1. 2026-08-04 18:56:33 +02:00
.gitignore Adding upstream version 1.10.1. 2026-08-04 18:55:53 +02:00
Cargo.lock Merging upstream version 1.11.1. 2026-08-04 18:56:33 +02:00
Cargo.toml Merging upstream version 1.11.1. 2026-08-04 18:56:33 +02:00
Cargo.toml.orig Merging upstream version 1.11.1. 2026-08-04 18:56:33 +02:00
CHANGELOG.md Merging upstream version 1.11.1. 2026-08-04 18:56:33 +02:00
clippy.toml Merging upstream version 1.11.0. 2026-08-04 18:56:13 +02:00
LICENSE Adding upstream version 1.10.1. 2026-08-04 18:55:53 +02:00
README.md Adding upstream version 1.10.1. 2026-08-04 18:55:53 +02:00
SECURITY.md Adding upstream version 1.10.1. 2026-08-04 18:55:53 +02:00

Bytes

A utility library for working with bytes.

Crates.io Build Status

Documentation

Usage

To use bytes, first add this to your Cargo.toml:

[dependencies]
bytes = "1"

Next, add this to your crate:

use bytes::{Bytes, BytesMut, Buf, BufMut};

no_std support

To use bytes with no_std environment, disable the (enabled by default) std feature.

[dependencies]
bytes = { version = "1", default-features = false }

To use bytes with no_std environment without atomic CAS, such as thumbv6m, you also need to enable the extra-platforms feature. See the documentation for the portable-atomic crate for more information.

The MSRV when extra-platforms feature is enabled depends on the MSRV of portable-atomic.

Serde support

Serde support is optional and disabled by default. To enable use the feature serde.

[dependencies]
bytes = { version = "1", features = ["serde"] }

The MSRV when serde feature is enabled depends on the MSRV of serde.

Building documentation

When building the bytes documentation the docsrs option should be used, otherwise feature gates will not be shown. This requires a nightly toolchain:

RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc

License

This project is licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in bytes by you, shall be licensed as MIT, without any additional terms or conditions.