Cargo Features

[dependencies]
bytes = { version = "1.10.0", default-features = false, features = ["std", "serde", "extra-platforms"] }
default = std

The std feature is set by default whenever bytes is added without default-features = false somewhere in the dependency tree.

std default

Affects buf_impl::Buf.chunks_vectored, buf_impl::Buf.reader, buf_mut::BufMut.writer

Features from optional dependencies

serde implicit feature

Enables serde

serde:

A generic serialization/deserialization framework

extra-platforms implicit feature

Enables portable-atomic

Use portable-atomic crate to support platforms without atomic CAS.
See "no_std support" section in readme for more information.

Enable require-cas feature to provide a better error message if the end user forgets to use the cfg or feature.