arrayvec
A vector with fixed capacity, backed by an array (it can be stored on the stack too). Implements fixed capacity ArrayVec and ArrayString.
0.7.8
523M downloads/mo
#196 most downloaded on crates.io
bluss/arrayvec
What this package is like to depend on
Last release 1 months ago
02 Jul 2026
Release timing varies
gaps range from 2 weeks to 1.8 years
Some releases are documented
notes for 15 of 57 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
57 releases · first in 2015
2 releases in the last 12 months
see the full history below
Release timeline
57 releases · May 2015 to Jul 2026Releases
latest 57-
0.7.802 Jul 2026 -
0.7.720 Jun 2026 -
0.7.617 Aug 2024 -
0.7.517 Aug 2024Release notes
Open source →- Add
as_ptrandas_mut_ptrtoArrayString@YuhanLiin #260 - Add borsh serialization support by @honzasp and @Fuuzetsu #259
- Move length field before before data in ArrayVec and ArrayString by @JakkuSakura #255
- Fix miri error for ZST case in extend by @bluss
- implement AsRef for ArrayString by @Zoybean #218
- Fix typos in changelog by @striezel #241
- Add
as_slice,as_mut_slicemethods toIntoIterby @clarfonthey #224
Release notes
Open source →- Add
as_ptrandas_mut_ptrtoArrayString@YuhanLiin #260 - Add borsh serialization support by @honzasp and @Fuuzetsu #259
- Move length field before before data in ArrayVec and ArrayString by @JakkuSakura #255
- Fix miri error for ZST case in extend by @bluss
- implement AsRef<Path> for ArrayString by @Zoybean #218
- Fix typos in changelog by @striezel #241
- Add
as_slice,as_mut_slicemethods toIntoIterby @clarfonthey #224
- Add
-
0.7.417 Jun 2023 -
0.7.312 Jun 2023Release notes
Open source →- Use track_caller on multiple methods like push and similar, for capacity overflows by @kornelski
- impl BorrowMut for ArrayString by @msrd0
- Fix stacked borrows violations by @clubby789
- Update Miri CI by @RalfJung
-
0.7.228 Oct 2021Release notes
Open source →- Add
.as_mut_str()toArrayStringby @clarfonthey - Add
remaining_capacitytoArrayStringby @bhgomes - Add
zero_filledconstructor by @c410-f3r - Optimize
retainby @TennyZhuang and @niklasf - Make the following methods
constby @bhgomes:- len
- is_empty
- capacity
- is_full
- remaining_capacity
- CapacityError::new
- Add
-
0.7.105 Jun 2021Release notes
Open source →- Add new ArrayVec methods
.take()and.into_inner_unchecked()by @conradludgate clone_fromnow usestruncatewhen needed by @a1phyr
- Add new ArrayVec methods
-
0.7.029 Mar 2021Release notes
Open source →-
fn new_constis now the way to const-construct arrayvec and arraystring, andfn newhas been reverted to a regular "non-const" function. This works around performance issue #182, where the const fn version did not optimize well. Change by @bluss with thanks to @rodrimati1992 and @niklasf for analyzing the problem. -
The deprecated feature flag
unstable-const-fnwas removed, since it's not needed -
Optimize
.retain()by using the same algorithm as in std, change by @niklasf, issue #174. Original optimization in Rust std by @oxalica in rust-lang/rust/pull/81126
-
-
0.6.129 Mar 2021Release notes
Open source →-
The
ArrayVec::newandArrayString::newconstructors are properly const fns on stable and the feature flagunstable-const-fnis now deprecated. by @rodrimati1992 -
Small fix to the capacity check macro by @Xaeroxe
-
Typo fix in documentation by @cuviper
-
Small code cleanup by @bluss
-
-
0.6.024 Mar 2021Release notes
Open source →-
The const generics release 🎉. Arrayvec finally implements what it wanted to implement, since its first version: a vector backed by an array, with generic parameters for the arbitrary element type and backing array capacity.
The New type syntax is
ArrayVec<T, CAP>whereCAPis the arrayvec capacity. For arraystring the syntax isArrayString<CAP>.Length is stored internally as u32; this limits the maximum capacity. The size of the
ArrayVecorArrayStringstructs for the same capacity may grow slightly compared with the previous version (depending on padding requirements for the element type). Change by @bluss. -
Arrayvec's
.extend()andFromIterator/.collect()to arrayvec now panic if the capacity of the arrayvec is exceeded. Change by @bluss. -
Arraystring now implements
TryFrom<&str>andTryFrom<fmt::Arguments>by @c410-f3r -
Minimum supported rust version is Rust 1.51
-
-
0.5.223 Oct 2020Release notes
Open source →- Add
is_emptymethods for ArrayVec and ArrayString by @nicbn - Implement
TryFrom<Slice>for ArrayVec by @paulkernfeld - Add
unstable-const-fnto makenewmethods const by @m-ou-se - Run miri in CI and a few related fixes by @RalfJung
- Fix outdated comment by @Phlosioneer
- Move changelog to a separate file by @Luro02
- Remove deprecated
Error::descriptionby @AnderEnder - Use pointer method
addby @hbina
- Add
-
0.5.109 Oct 2019Release notes
Open source →- Add
as_ptr,as_mut_ptraccessors directly on theArrayVecby @tbu- (matches the same addition toVecwhich happened in Rust 1.37). - Add method
ArrayString::len(now available directly, not just through deref to str). - Use raw pointers instead of
&mut [u8]for encoding chars intoArrayString(uninit best practice fix). - Use raw pointers instead of
get_unchecked_mutwhere the target may be uninitialized everywhere relevant in the ArrayVec implementation (uninit best practice fix). - Changed inline hints on many methods, mainly removing inline hints
ArrayVec::disposeis now deprecated (it has no purpose anymore)
- Add
-
0.5.025 Sep 2019Release notes
Open source →- Use
MaybeUninit(now unconditionally) in the implementation ofArrayVec - Use
MaybeUninit(now unconditionally) in the implementation ofArrayString - The crate feature for serde serialization is now named
serde. - Updated the
Arraytrait interface, and it is now easier to use for users outside the crate. - Add
FromStrimpl forArrayStringby @despawnerer - Add method
try_extend_from_slicetoArrayVec, which is always efficient by @Thomasdezeeuw. - Add method
remaining_capacityby @Thomasdezeeuw - Improve performance of the
extendmethod. - The index type of zero capacity vectors is now itself zero size, by @clarfon
- Use
drop_in_placefor truncate and clear methods. This affects drop order and resume from panic during drop. - Use Rust 2018 edition for the implementation
- Require Rust 1.36 or later, for the unconditional
MaybeUninitimprovements.
- Use
-
0.4.1209 Oct 2019Release notes
Open source →- Use raw pointers instead of
get_unchecked_mutwhere the target may be uninitialized everywhere relevant in the ArrayVec implementation.
- Use raw pointers instead of
-
0.4.1110 Jul 2019Nothing published for this version
-
0.4.1022 Dec 2018Nothing published for this version
-
0.4.916 Dec 2018Nothing published for this version
-
0.4.825 Nov 2018Nothing published for this version
-
0.4.717 Jan 2018Nothing published for this version
-
0.4.604 Nov 2017Nothing published for this version
-
0.4.527 Oct 2017Nothing published for this version
-
0.4.421 Oct 2017Nothing published for this version
-
0.4.316 Oct 2017Nothing published for this version
-
0.4.224 Sep 2017Nothing published for this version
-
0.4.111 Sep 2017Nothing published for this version
-
0.4.008 Aug 2017Nothing published for this version
-
0.3.2517 Jan 2018Nothing published for this version
-
0.3.2404 Nov 2017Nothing published for this version
-
0.3.2323 Apr 2017Nothing published for this version
-
0.3.2225 Mar 2017Nothing published for this version
-
0.3.2117 Mar 2017Nothing published for this version
-
0.3.2004 Oct 2016Nothing published for this version
-
0.3.1928 Sep 2016Nothing published for this version
-
0.3.1821 Sep 2016Nothing published for this version
-
0.3.1708 Sep 2016Nothing published for this version
-
0.3.1629 Feb 2016Nothing published for this version
-
0.3.1506 Feb 2016Nothing published for this version
-
0.3.1406 Feb 2016Nothing published for this version
-
0.3.1313 Jan 2016Nothing published for this version
-
0.3.1220 Sep 2015Nothing published for this version
-
0.3.1110 Sep 2015Nothing published for this version
-
0.3.1021 Aug 2015Nothing published for this version
-
0.3.930 Jul 2015Nothing published for this version
-
0.3.830 Jul 2015Nothing published for this version
-
0.3.722 Jun 2015Nothing published for this version
-
0.3.614 Jun 2015Nothing published for this version
-
0.3.502 Jun 2015Nothing published for this version
-
0.3.425 May 2015Nothing published for this version
-
0.3.323 May 2015Nothing published for this version
-
0.3.222 May 2015Nothing published for this version
-
0.3.122 May 2015Nothing published for this version
-
0.3.022 May 2015Nothing published for this version
-
0.2.021 May 2015Nothing published for this version
-
0.1.220 May 2015Nothing published for this version
-
0.1.119 May 2015Nothing published for this version
-
0.1.019 May 2015Nothing published for this version