#vector #array #stack #no-std

no-std arrayvec

A vector with fixed capacity, backed by an array (it can be stored on the stack too). Implements fixed capacity ArrayVec and ArrayString.

55 releases

0.7.6 Aug 17, 2024
0.7.4 Jun 17, 2023
0.7.2 Oct 28, 2021
0.7.1 Jun 5, 2021
0.3.9 Jul 30, 2015

#14 in Data structures

Download history 1453856/week @ 2024-08-21 1349413/week @ 2024-08-28 1451439/week @ 2024-09-04 1371641/week @ 2024-09-11 1489480/week @ 2024-09-18 1597835/week @ 2024-09-25 1992318/week @ 2024-10-02 2009515/week @ 2024-10-09 2063110/week @ 2024-10-16 1558415/week @ 2024-10-23 1525817/week @ 2024-10-30 1601428/week @ 2024-11-06 1710882/week @ 2024-11-13 1701853/week @ 2024-11-20 1482596/week @ 2024-11-27 1788394/week @ 2024-12-04

6,988,015 downloads per month
Used in 13,530 crates (808 directly)

MIT/Apache

75KB
1.5K SLoC

arrayvec

Crates.io: arrayvec Documentation Build Status

License: Apache OR License: MIT

A vector with fixed capacity.

Please read the API documentation here

License

Dual-licensed to be compatible with the Rust project.

Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 or the MIT license http://opensource.org/licenses/MIT, at your option. This file may not be copied, modified, or distributed except according to those terms.


lib.rs:

arrayvec provides the types ArrayVec and ArrayString: array-backed vector and string types, which store their contents inline.

The arrayvec package has the following cargo features:

  • std

    • Optional, enabled by default
    • Use libstd; disable to use no_std instead.
  • serde

    • Optional
    • Enable serialization for ArrayVec and ArrayString using serde 1.x
  • zeroize

    • Optional
    • Implement Zeroize for ArrayVec and ArrayString

Rust Version

This version of arrayvec requires Rust 1.51 or later.

Dependencies

~200KB