PackageTrack
Sign in Get early access

bytes

Types and traits for working with bytes

1.12.1 964M downloads/mo #49 most downloaded on crates.io tokio-rs/bytes

What this package is like to depend on

Last release 1 months ago

08 Jul 2026

Release timing varies

gaps range from 3 weeks to 8 months

Most releases are documented

notes for 38 of 55 stable releases

4 versions withdrawn

withdrawn after publishing

12 years old

59 releases · first in 2015

4 releases in the last 12 months

see the full history below

Release timeline

59 releases · Jan 2015 to Jul 2026
2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 59
  1. 1.12.1 08 Jul 2026
    Release notes

    1.12.1 (July 8th, 2026)

    Fixed

    • Properly handle when Box::new panics (#837)
    Open source →
    Release notes

    Fixed

    • Properly handle when Box::new panics (#837)
    Open source →
  2. 1.12.0 18 Jun 2026
    Release notes

    1.12.0 (June 18th, 2026)

    Added

    • Add BytesMut::extend_from_within() (#818)
    • Add BytesMut::try_unsplit() (#746)

    Fixed

    • Fix panic in get_int if nbytes is zero (#806)

    Changed

    • Pass vtable data by value (#826)
    • Exclude development scripts from published package (#810)

    Documented

    • Document that BytesMut::{reserve,try_reserve} doesn't preserve unused capacity (#808)
    Open source →
    Release notes

    Added

    • Add BytesMut::extend_from_within() (#818)
    • Add BytesMut::try_unsplit() (#746)

    Fixed

    • Fix panic in get_int if nbytes is zero (#806)

    Changed

    • Pass vtable data by value (#826)
    • Exclude development scripts from published package (#810)

    Documented

    • Document that BytesMut::{reserve,try_reserve} doesn't preserve unused capacity (#808)
    Open source →
  3. 1.11.1 03 Feb 2026
    Release notes

    1.11.1 (February 3rd, 2026)

    • Fix integer overflow in BytesMut::reserve
    Open source →
    Release notes
    • Fix integer overflow in BytesMut::reserve
    Open source →
  4. 1.11.0 14 Nov 2025
    Release notes

    1.11.0 (November 14th, 2025)

    • Bump MSRV to 1.57 (#788)

    Fixed

    • fix: BytesMut only reuse if src has remaining (#803)
    • Specialize BytesMut::put::<Bytes> (#793)
    • Reserve capacity in BytesMut::put (#794)
    • Change BytesMut::remaining_mut to use isize::MAX instead of usize::MAX (#795)

    Internal changes

    • Guarantee address in slice() for empty slices. (#780)
    • Rename Vtable::to_* -> Vtable::into_* (#776)
    • Fix latest clippy warnings (#787)
    • Ignore BytesMut::freeze doctest on wasm (#790)
    • Move drop_fn of from_owner into vtable (#801)
    Open source →
    Release notes
    • Bump MSRV to 1.57 (#788)

    Fixed

    • fix: BytesMut only reuse if src has remaining (#803)
    • Specialize BytesMut::put::<Bytes> (#793)
    • Reserve capacity in BytesMut::put (#794)
    • Change BytesMut::remaining_mut to use isize::MAX instead of usize::MAX (#795)

    Internal changes

    • Guarantee address in slice() for empty slices. (#780)
    • Rename Vtable::to_* -> Vtable::into_* (#776)
    • Fix latest clippy warnings (#787)
    • Ignore BytesMut::freeze doctest on wasm (#790)
    • Move drop_fn of from_owner into vtable (#801)
    Open source →
  5. 1.10.1 05 Mar 2025
    Release notes

    1.10.1 (March 5th, 2025)

    Fixed

    • Fix memory leak when using to_vec with Bytes::from_owner (#773)
    Open source →
    Release notes

    Fixed

    • Fix memory leak when using to_vec with Bytes::from_owner (#773)
    Open source →
  6. 1.10.0 03 Feb 2025
    Release notes

    1.10.0 (February 3rd, 2025)

    Added

    • Add feature to support platforms without atomic CAS (#467)
    • try_get_* methods for Buf trait (#753)
    • Implement Buf::chunks_vectored for Take (#617)
    • Implement Buf::chunks_vectored for VecDeque<u8> (#708)

    Fixed

    • Remove incorrect guarantee for chunks_vectored (#754)
    • Ensure that tests pass under panic=abort (#749)
    Open source →
    Release notes

    Added

    • Add feature to support platforms without atomic CAS (#467)
    • try_get_* methods for Buf trait (#753)
    • Implement Buf::chunks_vectored for Take (#617)
    • Implement Buf::chunks_vectored for VecDeque<u8> (#708)

    Fixed

    • Remove incorrect guarantee for chunks_vectored (#754)
    • Ensure that tests pass under panic=abort (#749)
    Open source →
  7. 1.9.0 28 Nov 2024
    Release notes

    1.9.0 (November 27, 2024)

    Added

    • Add Bytes::from_owner to enable externally-allocated memory (#742)

    Documented

    • Fix typo in Buf::chunk() comment (#744)

    Internal changes

    • Replace BufMut::put with BufMut::put_slice in Writer impl (#745)
    • Rename hex_impl! to fmt_impl! and reuse it for fmt::Debug (#743)
    Open source →
    Release notes

    Added

    • Add Bytes::from_owner to enable externally-allocated memory (#742)

    Documented

    • Fix typo in Buf::chunk() comment (#744)

    Internal changes

    • Replace BufMut::put with BufMut::put_slice in Writer impl (#745)
    • Rename hex_impl! to fmt_impl! and reuse it for fmt::Debug (#743)
    Open source →
  8. 1.8.0 21 Oct 2024
    Release notes

    1.8.0 (October 21, 2024)

    • Guarantee address in split_off/split_to for empty slices (#740)
    Open source →
    Release notes
    • Guarantee address in split_off/split_to for empty slices (#740)
    Open source →
  9. 1.7.2 18 Sep 2024
    Release notes

    1.7.2 (September 17, 2024)

    Fixed

    • Fix default impl of Buf::{get_int, get_int_le} (#732)

    Documented

    • Fix double spaces in comments and doc comments (#731)

    Internal changes

    • Ensure BytesMut::advance reduces capacity (#728)
    Open source →
    Release notes

    Fixed

    • Fix default impl of Buf::{get_int, get_int_le} (#732)

    Documented

    • Fix double spaces in comments and doc comments (#731)

    Internal changes

    • Ensure BytesMut::advance reduces capacity (#728)
    Open source →
  10. 1.7.1 01 Aug 2024
    Release notes

    1.7.1 (August 1, 2024)

    This release reverts the following change due to a regression:

    • Reuse capacity when possible in <BytesMut as Buf>::advance impl (#698)

    The revert can be found at #726.

    Open source →
    Release notes

    This release reverts the following change due to a regression:

    • Reuse capacity when possible in <BytesMut as Buf>::advance impl (#698)

    The revert can be found at #726.

    Open source →
  11. 1.7.0 31 Jul 2024
    Release notes

    Added

    • Add conversion from Bytes to BytesMut (#695, #710)
    • Add reclaim method without additional allocation (#686)

    Documented

    • Clarify how BytesMut::zeroed works (#714)
    • Clarify the behavior of Buf::chunk (#717)

    Changed

    • Change length condition of BytesMut::truncate
    • Reuse capacity when possible in <BytesMut as Buf>::advance impl (#698)
    • Improve must_use suggestion of BytesMut::split (#699)

    Internal changes

    • Use ManuallyDrop instead of mem::forget (#678)
    • Don't set len in BytesMut::reserve (#682)
    • Optimize Bytes::copy_to_bytes (#688)
    • Refactor BytesMut::truncate (#694)
    • Refactor BytesMut::resize (#696)
    • Reorder assertion in Bytes::split_to, Bytes::split_off (#689, #693)
    • Use offset_from in more places (#705)
    • Correct the wrong usage of IntoIter (#707)
    Open source →
  12. 1.6.1 13 Jul 2024
    Release notes

    This release fixes a bug where Bytes::is_unique returns incorrect values when the Bytes originates from a shared BytesMut. (#718)

    Open source →
  13. 1.6.0 22 Mar 2024 withdrawn
    Release notes

    Added

    • Add Bytes::is_unique (#643)

    Documented

    • Fix changelog typo (#628)
    • Fix some spelling mistakes (#633)
    • Typo fix (#637)
    • Fix broken links (#639)
    • Add security policy (#649)

    Internal changes

    • Move comment to correct constant (#629)
    • Various cleanup (#635)
    • Simplify UninitSlice::as_uninit_slice_mut() logic (#644)
    • Use self. instead of Self:: (#642)
    • BytesMut: Assert alignment of Shared (#652)
    • Remove unnecessary namespace qualifier (#660)
    • Remove an unnecessary else branch (#662)
    • Remove unreachable else branch (#661)
    • make parameter mut in From<Vec> (#667)
    • Restore commented tests (#665)
    • Use sub instead of offset (#668)
    • Calculate original capacity only if necessary (#666)
    • set_vec_pos does not need a second parameter (#672)
    • get_vec_pos: use &self instead of &mut self (#670)
    • Refactor split_at/split_to (#663)
    • Use Iterator from the prelude (#673)
    • copy_to_bytes: Add panic section to docs (#676)
    • Remove redundant reserve call (#674)
    • Use ManuallyDrop instead of mem::forget (#675)
    Open source →
  14. 1.5.0 07 Sep 2023
    Release notes

    Added

    • Add UninitSlice::{new,uninit} (#598, #599)
    • Implement BufMut for &mut [MaybeUninit<u8>] (#597)

    Changed

    • Mark BytesMut::extend_from_slice as inline (#595)
    Open source →
  15. 1.4.0 31 Jan 2023
    Release notes

    Added

    • Make IntoIter constructor public (#581)

    Fixed

    • Avoid large reallocations when freezing BytesMut (#592)

    Documented

    • Document which functions require std (#591)
    • Fix duplicate "the the" typos (#585)
    Open source →
  16. 1.3.0 21 Nov 2022
    Release notes

    Added

    • Rename and expose BytesMut::spare_capacity_mut (#572)
    • Implement native-endian get and put functions for Buf and BufMut (#576)

    Fixed

    • Don't have important data in unused capacity when calling reserve (#563)

    Documented

    • Bytes::new etc should return Self not Bytes (#568)
    Open source →
  17. 1.2.1 30 Jul 2022
    Release notes

    Fixed

    • Fix unbounded memory growth when using reserve (#560)
    Open source →
  18. 1.2.0 19 Jul 2022
    Release notes

    Added

    • Add BytesMut::zeroed (#517)
    • Implement Extend<Bytes> for BytesMut (#527)
    • Add conversion from BytesMut to Vec<u8> (#543, #554)
    • Add conversion from Bytes to Vec<u8> (#547)
    • Add UninitSlice::as_uninit_slice_mut() (#548)
    • Add const to Bytes::{len,is_empty} (#514)

    Changed

    • Reuse vector in BytesMut::reserve (#539, #544)

    Fixed

    • Make miri happy (#515, #523, #542, #545, #553)
    • Make tsan happy (#541)
    • Fix remaining_mut() on chain (#488)
    • Fix amortized asymptotics of BytesMut (#555)

    Documented

    • Redraw layout diagram with box drawing characters (#539)
    • Clarify BytesMut::unsplit docs (#535)
    Open source →
  19. 1.1.0 25 Aug 2021
    Release notes

    Added

    • BufMut::put_bytes(self, val, cnt) (#487)
    • Implement From<Box<[u8]>> for Bytes (#504)

    Changed

    • Override put_slice for &mut [u8] (#483)
    • Panic on integer overflow in Chain::remaining (#482)
    • Add inline tags to UninitSlice methods (#443)
    • Override copy_to_bytes for Chain and Take (#481)
    • Keep capacity when unsplit on empty other buf (#502)

    Documented

    • Clarify BufMut allocation guarantees (#501)
    • Clarify BufMut::put_int behavior (#486)
    • Clarify actions of clear and truncate. (#508)
    Open source →
  20. 1.0.1 11 Jan 2021
    Release notes

    Changed

    • mark Vec::put_slice with #[inline] (#459)

    Fixed

    • Fix deprecation warning (#457)
    • use Box::into_raw instead of mem::forget-in-disguise (#458)
    Open source →
  21. 1.0.0 22 Dec 2020
    Release notes

    Changed

    • Rename Buf/BufMut methods bytes() and bytes_mut() to chunk() and chunk_mut() (#450)

    Removed

    • remove unused Buf implementation. (#449)
    Open source →
  22. 0.6.0 20 Oct 2020
    Release notes

    API polish in preparation for a 1.0 release.

    Changed

    • BufMut is now an unsafe trait (#432).
    • BufMut::bytes_mut() returns &mut UninitSlice, a type owned by bytes to avoid undefined behavior (#433).
    • Buf::copy_to_bytes(len) replaces Buf::into_bytes() (#439).
    • Buf/BufMut utility methods are moved onto the trait and *Ext traits are removed (#431).

    Removed

    • BufMut::bytes_vectored_mut() (#430).
    • new methods on combinator types (#434).
    Open source →
  23. 0.5.6 14 Jul 2020
    Release notes
    • Improve BytesMut to reuse buffer when fully advanced.
    • Mark BytesMut::{as_mut, set_len} with #[inline].
    • Relax synchronization when cloning in shared vtable of Bytes.
    • Move loom to dev-dependencies.
    Open source →
  24. 0.5.5 18 Jun 2020
    Release notes

    Added

    • Allow using the serde feature in no_std environments (#385).

    Fix

    • Fix BufMut::advance_mut to panic if advanced passed the capacity (#354)..
    • Fix BytesMut::freeze ignoring amount previously advanced (#352).
    Open source →
  25. 0.5.4 23 Jan 2020
    Release notes

    Added

    • Make Bytes::new a const fn.
    • Add From<BytesMut> for Bytes.

    Fix

    • Fix reversed arguments in PartialOrd for Bytes.
    • Fix Bytes::truncate losing original capacity when repr is an unshared Vec.
    • Fix Bytes::from(Vec) when allocator gave Vec a pointer with LSB set.
    • Fix panic in Bytes::slice_ref if argument is an empty slice.
    Open source →
  26. 0.5.3 12 Dec 2019
    Release notes

    Added

    • must_use attributes to split, split_off, and split_to methods (#337).

    Fix

    • Potential freeing of a null pointer in Bytes when constructed with an empty Vec<u8> (#341, #342).
    • Calling Bytes::truncate with a size large than the length will no longer clear the Bytes (#333).
    Open source →
  27. 0.5.2 27 Nov 2019 withdrawn
    Release notes

    Added

    • Limit methods into_inner, get_ref, get_mut, limit, and set_limit (#325).
    Open source →
  28. 0.5.1 26 Nov 2019 withdrawn
    Release notes

    Fix

    • Growth documentation for BytesMut (#321)
    Open source →
  29. 0.5.0 25 Nov 2019 withdrawn
    Release notes

    Fix

    • Potential overflow in copy_to_slice

    Changed

    • Increased minimum supported Rust version to 1.39.
    • Bytes is now a "trait object", allowing for custom allocation strategies (#298)
    • BytesMut implicitly grows internal storage. remaining_mut() returns usize::MAX (#316).
    • BufMut::bytes_mut returns &mut [MaybeUninit<u8>] to reflect the unknown initialization state (#305).
    • Buf / BufMut implementations for &[u8] and &mut [u8] respectively (#261).
    • Move Buf / BufMut "extra" functions to an extension trait (#306).
    • BufMutExt::limit (#309).
    • Bytes::slice takes a RangeBounds argument (#265).
    • Bytes::from_static is now a const fn (#311).
    • A multitude of smaller performance optimizations.

    Added

    • no_std support (#281).
    • get_*, put_*, get_*_le, and put_*le accessors for handling byte order.
    • BorrowMut implementation for BytesMut (#185).

    Removed

    • IntoBuf (#288).
    • Buf implementation for &str (#301).
    • byteorder dependency (#280).
    • iovec dependency, use std::IoSlice instead (#263).
    • optional either dependency (#315).
    • optional i128 feature -- now available on stable. (#276).
    Open source →
  30. 0.4.12 06 Mar 2019
    Release notes

    Added

    • Implement FromIterator<&'a u8> for BytesMut/Bytes (#244).
    • Implement Buf for VecDeque (#249).
    Open source →
  31. 0.4.11 17 Nov 2018
    Release notes
    • Use raw pointers for potentially racy loads (#233).
    • Implement BufRead for buf::Reader (#232).
    • Documentation tweaks (#234).
    Open source →
  32. 0.4.10 04 Sep 2018
    Release notes
    • impl Buf and BufMut for Either (#225).
    • Add Bytes::slice_ref (#208).
    Open source →
  33. 0.4.9 23 Jul 2018
    Release notes
    • Add 128 bit number support behind a feature flag (#209).
    • Implement IntoBuf for &mut [u8]
    Open source →
  34. 0.4.8 25 May 2018
    Release notes
    • Fix panic in BytesMut FromIterator implementation.
    • Bytes: Recycle space when reserving space in vec mode (#197).
    • Bytes: Add resize fn (#203).
    Open source →
  35. 0.4.7 27 Apr 2018
    Release notes
    • Make Buf and BufMut usable as trait objects (#186).
    • impl BorrowMut for BytesMut (#185).
    • Improve accessor performance (#195).
    Open source →
  36. 0.4.6 08 Jan 2018
    Release notes
    • Implement FromIterator for Bytes/BytesMut (#148).
    • Add advance fn to Bytes/BytesMut (#166).
    • Add unsplit fn to BytesMut (#162, #173).
    • Improvements to Bytes split fns (#92).
    Open source →
  37. 0.4.5 12 Aug 2017
    Release notes
    • Fix range bug in Take::bytes
    • Misc performance improvements
    • Add extra PartialEq implementations.
    • Add Bytes::with_capacity
    • Implement AsMut[u8] for BytesMut
    Open source →
  38. 0.4.4 26 May 2017
    Release notes
    • Add serde support behind feature flag
    • Add extend_from_slice on Bytes and BytesMut
    • Add truncate and clear on Bytes
    • Misc additional std trait implementations
    • Misc performance improvements
    Open source →
  39. 0.4.3 30 Apr 2017
    Release notes
    • Fix Vec::advance_mut bug
    • Bump minimum Rust version to 1.15
    • Misc performance tweaks
    Open source →
  40. 0.4.2 05 Apr 2017
    Release notes
    • Misc performance tweaks
    • Improved Debug implementation for Bytes
    • Avoid some incorrect assert panics
    Open source →
  41. 0.4.1 15 Mar 2017
    Release notes
    • Expose buf module and have most types available from there vs. root.
    • Implement IntoBuf for T: Buf.
    • Add FromBuf and Buf::collect.
    • Add iterator adapter for Buf.
    • Add scatter/gather support to Buf and BufMut.
    • Add Buf::chain.
    • Reduce allocations on repeated calls to BytesMut::reserve.
    • Implement Debug for more types.
    • Remove Source in favor of IntoBuf.
    • Implement Extend for BytesMut.
    Open source →
  42. 0.4.0 24 Feb 2017
    Release notes
    • Initial release
    Open source →
  43. 0.3.0 04 Dec 2015

    Nothing published for this version

  44. 0.2.11 10 Aug 2015

    Nothing published for this version

  45. 0.2.10 08 Jul 2015

    Nothing published for this version

  46. 0.2.9 13 May 2015

    Nothing published for this version

  47. 0.2.8 22 Apr 2015

    Nothing published for this version

  48. 0.2.7 12 Apr 2015

    Nothing published for this version

  49. 0.2.6 07 Apr 2015

    Nothing published for this version

  50. 0.2.5 07 Apr 2015

    Nothing published for this version

  51. 0.2.4 02 Apr 2015

    Nothing published for this version

  52. 0.2.3 30 Mar 2015

    Nothing published for this version

  53. 0.2.2 29 Mar 2015

    Nothing published for this version

  54. 0.2.1 25 Mar 2015

    Nothing published for this version

  55. 0.2.0 25 Mar 2015

    Nothing published for this version

  56. 0.1.2 15 Feb 2015

    Nothing published for this version

  57. 0.1.1 11 Feb 2015

    Nothing published for this version

  58. 0.1.0 10 Feb 2015

    Nothing published for this version

  59. 0.0.1 30 Jan 2015

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive