PackageTrack
Sign in Get early access

bumpalo

A fast bump allocation arena for Rust.

3.20.3 535M downloads/mo #190 most downloaded on crates.io fitzgen/bumpalo

What this package is like to depend on

Last release 3 months ago

22 May 2026

Release timing varies

gaps range from 2 weeks to 10 months

Most releases are documented

notes for 30 of 43 stable releases

13 versions withdrawn

withdrawn after publishing

8 years old

56 releases · first in 2018

5 releases in the last 12 months

see the full history below

Release timeline

56 releases · Nov 2018 to May 2026
2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 56
  1. 3.20.3 22 May 2026
    Release notes
    • Add additional quickchecks and testing coverage

    • Rewind on slice allocation failure

    And deduplicate rewind logic into a single RewindGuard type.

    • cargo fmt

    • Fix MSRV build

    • cargo fmt

    Open source →
    Release notes

    Released 2026-05-22.

    Fixed

    • Fixed the try_alloc_slice_fill_with, alloc_slice_try_fill_with, alloc_slice_fill_with methods to properly rewind the bump pointer on allocation, initialization, and panic failure and avoid wasting bump capacity.
    • Fixed a drop bug in bumpalo::collections::vec::DrainFilter (used by retain and retain_mut) when the predicate panics.

    Open source →
  2. 3.20.2 19 Feb 2026
    Release notes

    Bump to version 3.20.2 (#312)

    Open source →
    Release notes

    Released 2026-02-19.

    Fixed

    • Restored Send and Sync implementations for Box<T> for T: ?Sized types as well.

    Open source →
  3. 3.20.1 18 Feb 2026
    Release notes
    • Add test for Box being Send + Sync

    • Bump to version 3.20.1

    Open source →
    Release notes

    Released 2026-02-18.

    Fixed

    • Restored Send and Sync implementations for Box<T> when T: Send and T: Sync respectively.

    Open source →
  4. 3.20.0 18 Feb 2026 withdrawn
    Release notes
    • Small clean ups and formatting

    • Bump to version 3.20.0

    • fmt

    Open source →
    Release notes

    Released 2026-02-18.

    Added

    • Added the bumpalo::collections::Vec::pop_if method.

    Fixed

    • Fixed a bug in the bumpalo::collections::String::retain method in the face of panics.
    • Made bumpalo::collections::Box<T> covariant with T (just like std::boxed::Box<T>).

    Open source →
  5. 3.19.1 16 Dec 2025
    Release notes

    Bump to version 3.19.1 (#300)

    Open source →
    Release notes

    Released 2025-12-16.

    Changed

    • Annotated bumpalo::collections::String::from_str_in as #[inline].

    Fixed

    • Fixed compilation failures with the latest nightly Rust when enabling the unstable allocator_api feature.

    Open source →
  6. 3.19.0 24 Jun 2025
    Release notes

    Bump to version 3.19.0 (#284)

    Open source →
    Release notes

    Released 2025-06-24.

    Added

    • Added bumpalo::collections::Vec::retain_mut, similar to std::vec::Vec::retain_mut.

    Open source →
  7. 3.18.1 05 Jun 2025
    Release notes
    • Revert "Update allocator-api2 to v0.3 (#271)"

    This reverts commit 86aaa10.

    This was a breaking change.

    • Bump to version 3.18.1
    Open source →
    Release notes

    Released 2025-06-05.

    Removed

    • Removed the allocator-api2 version bump from 3.18.0, as it was not actually semver compatible.

    Open source →
  8. 3.18.0 05 Jun 2025 withdrawn
    Release notes
    • Fix rustc warning

    • Bump to version 3.18.0

    Open source →
    Release notes

    Released 2025-06-05.

    Added

    • Added support for enforcing a minimum alignment on all allocations inside a Bump arena, which can provide speed ups when allocating objects whose alignment is less than or equal to that minimum.
    • Added serde serialization support for bumpalo::collections::String.
    • Added some missing fallible slice allocation function variants.

    Changed

    • Replaced extend_from_slice implementation with a formally-verified version that is also faster and more-optimizable for LLVM.
    • Updated allocator-api2 support to version 0.3.*.

    Fixed

    • Fixed a bug where the allocated_bytes metrics helper was accidentally including the size of bumpalo's footer, rather than just reporting the user-allocated bytes.

    Open source →
  9. 3.17.0 28 Jan 2025
    Release notes

    Bump to version 3.17.0 (#263)

    Open source →
    Release notes

    Released 2025-01-28.

    Added

    • Added a bunch of try_ allocation methods for slices and str:
      • try_alloc_slice_fill_default
      • try_alloc_slice_fill_iter
      • try_alloc_slice_fill_clone
      • try_alloc_slice_fill_copy
      • try_alloc_slice_fill_with
      • try_alloc_str
      • try_alloc_slice_clone
      • try_alloc_slice_copy

    Changed

    • Minimum supported Rust version reduced to 1.71.1

    Fixed

    • Fixed a stacked-borrows MIRI bug in dealloc

    Open source →
  10. 3.16.0 08 Apr 2024
    Release notes

    Released 2024-04-08.

    Added

    • Added an optional, off-by-default dependency on the serde crate. Enabling this dependency allows you to serialize Bumpalo's collection and box types. Deserialization is not implemented, due to constraints of the deserialization trait.

    Open source →
  11. 3.15.4 07 Mar 2024
    Release notes

    Released 2024-03-07.

    Added

    • Added the bumpalo::collections::Vec::extend_from_slices_copy method, which is a faster way to extend a vec from multiple slices when the element is Copy than calling extend_from_slice_copy N times.

    Open source →
  12. 3.15.3 22 Feb 2024
    Release notes

    Released 2024-02-22.

    Added

    • Added additional performance improvements to bumpalo::collections::Vec related to reserving capacity.

    Open source →
  13. 3.15.2 21 Feb 2024
    Release notes

    Released 2024-02-21.

    Added

    • Add a bumpalo::collections::Vec::extend_from_slice_copy method. This doesn't exist on the standard library's Vec but they have access to specialization, so their regular extend_from_slice has a specialization for Copy types. Using this new method for Copy types is a ~80x performance improvement over the plain extend_from_slice method.

    Open source →
  14. 3.15.1 20 Feb 2024
    Release notes

    Released 2024-02-20.

    Fixed

    • Fixed the MSRV listed in Cargo.toml, whose update was forgotten when the MSRV bumped in release 3.15.0.

    Open source →
  15. 3.15.0 15 Feb 2024 withdrawn
    Release notes

    Released 2024-02-15.

    Changed

    • The minimum supported Rust version (MSRV) is now 1.73.0.
    • bumpalo::collections::String::push_str and bumpalo::collections::String::from_str_in received significant performance improvements.
    • Allocator trait methods are now marked #[inline], increasing performance for some callers.

    Fixed

    • Fixed an edge-case bug in the Allocator::shrink method.

    Open source →
  16. 3.14.0 14 Sep 2023
    Release notes

    Released 2023-09-14.

    Added

    • Added the std cargo feature, which enables implementations of std traits for various things. Right now that is just std::io::Write for bumpalo::collections::Vec, but could be more in the future.

    Open source →
  17. 3.13.0 22 May 2023
    Release notes

    Released 2023-05-22.

    Added

    • New "allocator-api2" feature enables the use of the allocator API on stable. This feature uses a crate that mirrors the API of the unstable Rust allocator_api feature. If the feature is enabled, references to Bump will implement allocator_api2::Allocator. This allows Bump to be used as an allocator for collection types from allocator-api2 and any other crates that support allocator-api2.

    Changed

    • The minimum supported Rust version (MSRV) is now 1.63.0.

    Open source →
  18. 3.12.2 09 May 2023
    Release notes

    Released 2023-05-09.

    Changed

    • Added rust-version metadata to Cargo.toml which helps cargo with version resolution.

    Open source →
  19. 3.12.1 21 Apr 2023 withdrawn
    Release notes

    Released 2023-04-21.

    Fixed

    • Fixed a bug where Bump::try_with_capacity(n) where n > isize::MAX could lead to attempts to create invalid Layouts.

    Open source →
  20. 3.12.0 17 Jan 2023
    Release notes

    Released 2023-01-17.

    Added

    • Added the bumpalo::boxed::Box::bump and bumpalo::collections::String::bump getters to get the underlying Bump that a string or box was allocated into.

    Changed

    • Some uses of Box that MIRI did not previously consider as UB are now reported as UB, and bumpalo's internals have been adjusted to avoid the new UB.

    Open source →
  21. 3.11.1 18 Oct 2022
    Release notes

    Released 2022-10-18.

    Security

    • Fixed a bug where when std::vec::IntoIter was ported to bumpalo::collections::vec::IntoIter, it didn't get its underlying Bump's lifetime threaded through. This meant that rustc was not checking the borrows for bumpalo::collections::IntoIter and this could result in use-after-free bugs.

    Open source →
  22. 3.11.0 17 Aug 2022
    Release notes

    Released 2022-08-17.

    Added

    • Added support for per-Bump allocation limits. These are enforced only in the slow path when allocating new chunks in the Bump, not in the bump allocation hot path, and therefore impose near zero overhead.
    • Added the bumpalo::boxed::Box::into_inner method.

    Changed

    • Updated to Rust 2021 edition.
    • The minimum supported Rust version (MSRV) is now 1.56.0.

    Open source →
  23. 3.10.0 01 Jun 2022
    Release notes

    Released 2022-06-01.

    Added

    • Implement bumpalo::collections::FromIteratorIn for Option and Result, just like core does for FromIterator.
    • Implement bumpalo::collections::FromIteratorIn for bumpalo::boxed::Box<'a, [T]>.
    • Added running tests under MIRI in CI for additional confidence in unsafe code.
    • Publicly exposed bumpalo::collections::Vec::drain_filter since the corresponding std::vec::Vec method has stabilized.

    Changed

    • Bump::new will not allocate a backing chunk until the first allocation inside the bump arena now.

    Fixed

    • Properly account for alignment changes when growing or shrinking an existing allocation.
    • Removed all internal integer-to-pointer casts, to play better with UB checkers like MIRI.

    Open source →
  24. 3.9.1 06 Jan 2022
    Release notes

    Released 2022-01-06.

    Fixed

    • Fixed link to logo in docs and README.md

    Open source →
  25. 3.9.0 06 Jan 2022
    Release notes

    Released 2022-01-05.

    Changed

    • The minimum supported Rust version (MSRV) has been raised to Rust 1.54.0.

    • bumpalo::collections::Vec<T> implements relevant traits for all arrays of any size N via const generics. Previously, it was just arrays up to length 32. Similar for bumpalo::boxed::Box<[T; N]>.


    Open source →
  26. 3.8.0 19 Oct 2021
    Release notes

    Released 2021-10-19.

    Added

    • Added the CollectIn and FromIteratorIn traits to make building a collection from an iterator easier. These new traits live in the bumpalo::collections module and are implemented by bumpalo::collections::{String,Vec}.

    • Added the Bump::iter_allocated_chunks_raw method, which is an unsafe, raw version of Bump::iter_allocated_chunks. The new method does not take an exclusive borrow of the Bump and yields raw pointer-and-length pairs for each chunk in the bump. It is the caller's responsibility to ensure that no allocation happens in the Bump while iterating over chunks and that there are no active borrows of allocated data if they want to turn any pointer-and-length pairs into slices.


    Open source →
  27. 3.7.1 17 Sep 2021
    Release notes

    Released 2021-09-17.

    Changed

    • The packaged crate uploaded to crates.io when bumpalo is published is now smaller, thanks to excluding unnecessary files.

    Open source →
  28. 3.7.0 28 May 2021
    Release notes

    Released 2020-05-28.

    Added

    • Added Borrow and BorrowMut trait implementations for bumpalo::collections::Vec and bumpalo::collections::String. #108

    Changed

    • When allocating a new chunk fails, don't immediately give up. Instead, try allocating a chunk that is half that size, and if that fails, then try half of that size, etc until either we successfully allocate a chunk or we fail to allocate the minimum chunk size and then finally give up. #111

    Open source →
  29. 3.6.1 18 Feb 2021
    Release notes

    Released 2020-02-18.

    Added

    • Improved performance of Bump's Allocator::grow_zeroed trait method implementation. #99

    Open source →
  30. 3.6.0 29 Jan 2021
    Release notes

    Released 2020-01-29.

    Added

    • Added a few new flavors of allocation:

      • try_alloc for fallible, by-value allocation

      • try_alloc_with for fallible allocation with an infallible initializer function

      • alloc_try_with for infallible allocation with a fallible initializer function

      • try_alloc_try_with method for fallible allocation with a fallible initializer function

      We already have infallible, by-value allocation (alloc) and infallible allocation with an infallible initializer (alloc_with). With these new methods, we now have every combination covered.

      Thanks to Tamme Schichler for contributing these methods!


    Open source →
  31. 3.5.0 23 Jan 2021
    Release notes

    Released 2020-01-22.

    Added

    • Added experimental, unstable support for the unstable, nightly Rust allocator_api feature.

      The allocator_api feature defines an Allocator trait and exposes custom allocators for std types. Bumpalo has a matching allocator_api cargo feature to enable implementing Allocator and using Bump with std collections.

      First, enable the allocator_api feature in your Cargo.toml:

      [dependencies]
      bumpalo = { version = "3.5", features = ["allocator_api"] }
      

      Next, enable the allocator_api nightly Rust feature in your src/lib.rs or src/main.rs:

      # #[cfg(feature = "allocator_api")]
      # {
      #![feature(allocator_api)]
      # }
      

      Finally, use std collections with Bump, so that their internal heap allocations are made within the given bump arena:

      # #![cfg_attr(feature = "allocator_api", feature(allocator_api))]
      # #[cfg(feature = "allocator_api")]
      # {
      #![feature(allocator_api)]
      use bumpalo::Bump;
      
      // Create a new bump arena.
      let bump = Bump::new();
      
      // Create a `Vec` whose elements are allocated within the bump arena.
      let mut v = Vec::new_in(&bump);
      v.push(0);
      v.push(1);
      v.push(2);
      # }
      

      I'm very excited to see custom allocators in std coming along! Thanks to Arthur Gautier for implementing support for the allocator_api feature for Bumpalo.


    Open source →
  32. 3.4.0 01 Jun 2020
    Release notes

    Released 2020-06-01.

    Added

    • Added the bumpalo::boxed::Box<T> type. It is an owned pointer referencing a bump-allocated value, and it runs T's Drop implementation on the referenced value when dropped. This type can be used by enabling the "boxed" cargo feature flag.

    Open source →
  33. 3.3.0 13 May 2020
    Release notes

    Released 2020-05-13.

    Added

    • Added fallible allocation methods to Bump: try_new, try_with_capacity, and try_alloc_layout.

    • Added Bump::chunk_capacity

    • Added bumpalo::collections::Vec::try_reserve[_exact]


    Open source →
  34. 3.2.1 24 Mar 2020
    Release notes

    Released 2020-03-24.

    Security

    • When reallocing, if we allocate new space, we need to copy the old allocation's bytes into the new space. There are old_size number of bytes in the old allocation, but we were accidentally copying new_size number of bytes, which could lead to copying bytes into the realloc'd space from past the chunk that we're bump allocating out of, from unknown memory.

      If an attacker can cause reallocs, and can read the realoced data back, this could allow them to read things from other regions of memory that they shouldn't be able to. For example, if some crypto keys happened to live in memory right after a chunk we were bump allocating out of, this could allow the attacker to read the crypto keys.

      Beyond just fixing the bug and adding a regression test, I've also taken two additional steps:

      1. While we were already running the testsuite under valgrind in CI, because valgrind exits with the same code that the program did, if there are invalid reads/writes that happen not to trigger a segfault, the program can still exit OK and we will be none the wiser. I've enabled the --error-exitcode=1 flag for valgrind in CI so that tests eagerly fail in these scenarios.

      2. I've written a quickcheck test to exercise realloc. Without the bug fix in this patch, this quickcheck immediately triggers invalid reads when run under valgrind. We didn't previously have quickchecks that exercised realloc because realloc isn't publicly exposed directly, and instead can only be indirectly called. This new quickcheck test exercises realloc via bumpalo::collections::Vec::resize and bumpalo::collections::Vec::shrink_to_fit calls.

      This bug was introduced in version 3.0.0.

      See #69 for details.


    Open source →
  35. 3.2.0 07 Feb 2020 withdrawn
    Release notes

    Released 2020-02-07.

    Added

    • Added the bumpalo::collections::Vec::into_bump_slice_mut method to turn a bumpalo::collections::Vec<'bump, T> into a &'bump mut [T].

    Open source →
  36. 3.1.2 07 Jan 2020 withdrawn
    Release notes

    Released 2020-01-07.

    Fixed

    • The bumpalo::collections::format! macro did not used to accept a trailing comma like format!(in bump; "{}", 1,), but it does now.

    Open source →
  37. 3.1.1 03 Jan 2020 withdrawn
    Release notes

    Released 2020-01-03.

    Fixed

    • The bumpalo::collections::vec! macro did not used to accept a trailing comma like vec![in bump; 1, 2,], but it does now.

    Open source →
  38. 3.1.0 27 Dec 2019 withdrawn
    Release notes

    Released 2019-12-27.

    Added

    • Added the Bump::allocated_bytes diagnostic method for counting the total number of bytes a Bump has allocated.

    3.0.0

    Released 2019-12-20.

    Open source →
  39. 3.0.0 20 Dec 2019 withdrawn

    Nothing published for this version

  40. 2.6.0 19 Aug 2019

    Nothing published for this version

  41. 2.5.0 01 Jul 2019

    Nothing published for this version

  42. 2.4.3 20 May 2019

    Nothing published for this version

  43. 2.4.2 17 May 2019

    Nothing published for this version

  44. 2.4.1 19 Apr 2019

    Nothing published for this version

  45. 2.4.0 19 Apr 2019

    Nothing published for this version

  46. 2.3.0 26 Mar 2019

    Nothing published for this version

  47. 2.2.2 18 Mar 2019

    Nothing published for this version

  48. 2.2.1 18 Mar 2019 withdrawn

    Nothing published for this version

  49. 2.2.0 16 Mar 2019 withdrawn

    Nothing published for this version

  50. 2.1.0 12 Feb 2019

    Nothing published for this version

  51. 2.0.0 11 Feb 2019

    Nothing published for this version

  52. 1.2.0 16 Jan 2019

    Nothing published for this version

  53. 1.1.0 28 Nov 2018

    Nothing published for this version

  54. 1.0.2 26 Nov 2018

    Nothing published for this version

  55. 1.0.1 26 Nov 2018 withdrawn

    Nothing published for this version

  56. 1.0.0 24 Nov 2018 withdrawn

    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