cargo / bytes
bytes
What changed in bytes 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
4 breaking1 security2 new APIs and options6 performance7 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initbytes 120 changes
Breaking changes 4
The minimum supported Rust version is now 1.57.
An unused Buf implementation was removed.
A Buf method was renamed to chunk as part of committing to a public API with long-term support.
A BufMut method was renamed to chunk_mut as part of committing to a public API with long-term support.
Security 1
bytes has integer overflow in BytesMut::reserve
New APIs and options 2
Adds BytesMut::extend_from_within().
Adds BytesMut::try_unsplit().
Performance 6
Specializes extension for u8 when the BytesMut is Vec-backed.
Improves put_bytes performance.
Optimizes the cold reuse path and avoids reserving when the source is contiguous.
Improves write_all performance.
BytesMut::put is specialized for Bytes.
BytesMut::put now reserves capacity.
Fixes and other changes 7
Releases the shared reference when truncating a Bytes value to zero length.
Preserves buffer order when collecting vectored chunks.
Fixes sign extension when converting integers.
Properly handles cases when Box::new panics.
Fixes a panic in get_int when nbytes is zero.
BytesMut only reuses the source when it has remaining bytes.
BytesMut::remaining_mut uses isize::MAX instead of usize::MAX.