#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

#8 in Data structures

Download history 1279161/week @ 2024-05-31 1224345/week @ 2024-06-07 1205216/week @ 2024-06-14 1251353/week @ 2024-06-21 1164045/week @ 2024-06-28 1199486/week @ 2024-07-05 1251906/week @ 2024-07-12 1287253/week @ 2024-07-19 1263709/week @ 2024-07-26 1289104/week @ 2024-08-02 1386994/week @ 2024-08-09 1393253/week @ 2024-08-16 1446031/week @ 2024-08-23 1355082/week @ 2024-08-30 1408145/week @ 2024-09-06 1145050/week @ 2024-09-13

5,619,593 downloads per month
Used in 12,382 crates (767 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

~215KB