#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 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 1320062/week @ 2024-09-13 1572260/week @ 2024-09-20 1614863/week @ 2024-09-27 2093746/week @ 2024-10-04 1948011/week @ 2024-10-11 2057798/week @ 2024-10-18 1538281/week @ 2024-10-25 1280837/week @ 2024-11-01

7,128,686 downloads per month
Used in 13,102 crates (794 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