#alignment #vec #box #allocation #slice

no-std aligned-vec

Aligned vector and box containers

12 releases

0.6.4 Mar 15, 2025
0.6.1 Jul 18, 2024
0.5.0 Aug 21, 2022
0.4.2 Jul 29, 2022

#57 in Data structures

Download history 147015/week @ 2024-12-06 141470/week @ 2024-12-13 87608/week @ 2024-12-20 84309/week @ 2024-12-27 145557/week @ 2025-01-03 214969/week @ 2025-01-10 164204/week @ 2025-01-17 176713/week @ 2025-01-24 190560/week @ 2025-01-31 223137/week @ 2025-02-07 206726/week @ 2025-02-14 236325/week @ 2025-02-21 512804/week @ 2025-02-28 579937/week @ 2025-03-07 584572/week @ 2025-03-14 1133807/week @ 2025-03-21

2,857,389 downloads per month
Used in 254 crates (33 directly)

MIT license

58KB
1.5K SLoC

aligned-vec

This crate provides the AVec<T> and ABox<T> types, which are intended to have a similar API to Vec<T> and Box<T>, but align the data they contain to a runtime alignment value.

This is useful for situations where the alignment of the data matters, such as when working with numerical data that can get performance benefits from being aligned to a SIMD-compatible memory address.

Features

  • std (default feature): Links this crate to the std-crate instead of the core-crate.
  • serde: Implements serialization and deserialization features for ABox and AVec.

lib.rs:

aligned-vec

This crate provides the AVec<T> and ABox<T> types, which are intended to have a similar API to Vec<T> and Box<T>, but align the data they contain to a runtime alignment value.

This is useful for situations where the alignment of the data matters, such as when working with numerical data that can get performance benefits from being aligned to a SIMD-compatible memory address.

Features

  • std (default feature): Links this crate to the std-crate instead of the core-crate.
  • serde: Implements serialization and deserialization features for ABox and AVec.

Dependencies

~235–720KB
~17K SLoC