#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

#7 in Data structures

Download history 1266408/week @ 2024-08-03 1385402/week @ 2024-08-10 1430282/week @ 2024-08-17 1431786/week @ 2024-08-24 1374842/week @ 2024-08-31 1388852/week @ 2024-09-07 1323198/week @ 2024-09-14 1559132/week @ 2024-09-21 1634327/week @ 2024-09-28 2095693/week @ 2024-10-05 1977375/week @ 2024-10-12 2035947/week @ 2024-10-19 1520263/week @ 2024-10-26 1615749/week @ 2024-11-02 1644183/week @ 2024-11-09 1434268/week @ 2024-11-16

6,463,581 downloads per month
Used in 13,273 crates (798 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

~210KB