Cryptographically verifiable, distributed dependency reviews
Add the last reviewed version to Cargo.toml / [dependencies]:
arrayvec = "0.7.2"
Please, use mobile in landscape.
Filter reviews clicking on the numbers in the summary.
Full column names in tooltip hints: rating Negative, rating Neutral, rating Positive, rating Strong, thoroughness, understanding, reviews count.
Stack/value variable length arrays without heap fallback.
Pros:
Cons:
Diff | Rating | Notes |
---|---|---|
.cargo_vs_info.json | +1 | |
.travis.yml | +1 | MSRV bumped to 1.36.0, features tweaked. |
Cargo.toml | +1 | feature "serde-1" -> "serde", 2018 edition, drop cruft |
Cargo.toml.orig | +1 | |
README.rst | 0 | "(not yet released)" no longer accurate. |
benches/extend.rs | +1 | +black_box |
build.rs | +1 | Dropped? |
src/array.rs | +1 | Improved safety docs, although could use more explaination of what relies on the invariants. () and bool indexing for 1/2-len arrays. |
src/array_string.rs | 0 | mem::zeroed -> MaybeUninitCopy::uninitialized. Lots of Copy constraints, one transmute -> from_utf8_unchecked_mut (safer). |
src/lib.rs | 0 | truncate now unsafe (but sound), new try_extend_from_slice is unsafe (but sound). ArrayVec::extend ZST handling is obtuse, would be unsound in C++, but I believe sound in Rust, maybe? |
src/maybe_uninit.rs | +1 | |
src/maybe_uninit_nodrop.rs | +1 | Removed |
src/maybe_uninit_stable.rs | +1 | Removed |
src/range.rs | +1 | Removed |
tests/serde.rs | +1 | |
tests/tests.rs | +1 | New test cases |
Probably sound as of 0.4.11 on Rust 1.36.0+?
Uses a disturbing amount of unsafe, but aside from uninitialized! use in ArrayVec 1.35 and earlier, it all at least appears to be correct after a careful reading.
Unlike smallvec, this doesn't fall back on the heap.
Better than whatever you'll write rolling your own, at least.
0.4.7 -> 0.4.8: IntoIter implemented Clone, unconcerning
0.4.8 -> 0.4.9: ArrayString initialized to 0, ArrayVec uses nightly MaybeUninit. Unfortunately stable still uses uninitialized!() so this is still negative.
0.4.9 -> 0.4.10: #[repr(C)], -Clone for MaybeUninit. Apparently I missed more possible unsoundness. Unsafe is hard.
0.4.10 -> 0.4.11: ArrayVec should now also be sound in Rust 1.36.0+, probably, maybe.
© bestia.dev 2023, MIT License, Version: 2023.608.1636
Open source repository for this web app: https://github.com/bestia-dev/cargo_crev_web/
Stack/value variable length arrays without heap fallback.
Pros:
Cons:
This version switched some slices possibly containing uninit (UB!) to use
pointers instead. This makes
encode_utf8
unsafe, sadly.#[inline]
fn len
, removed#[inline]
, use ptr instead of sliceencode_utf8
is now sadly unsafe, more test coverageas_*_ptr
to match Vec (safe/sound)