Cargo Features

TinyVec has no features set by default.

[dependencies]
tinyvec = { version = "1.8.0", features = ["alloc", "std", "grab_spare_slice", "rustc_1_40", "rustc_1_55", "rustc_1_57", "rustc_1_61", "nightly_slice_partition_dedup", "debugger_visualizer", "experimental_write_impl", "real_blackbox", "serde", "arbitrary"] }
alloc std? = tinyvec_macros

Provide things that utilize the alloc crate, namely TinyVec.

std = alloc

Provide things that require Rust's std module

grab_spare_slice

(not part of Vec!) Extra methods to let you grab the slice of memory after the "active" portion of an ArrayVec or SliceVec.

rustc_1_40

obsolete feature that has to stay for semver reasons

rustc_1_55 rustc_1_57?

features that require rustc 1.55
use const generics to implement Array for all array lengths

rustc_1_57 = rustc_1_55

features that require rustc 1.57
add try_reserve functions to types that heap allocate.

rustc_1_61

features that require rustc 1.61
add retain_mut function to TinyVec

nightly_slice_partition_dedup

allow use of nightly feature slice_partition_dedup, will become useless once that is stabilized: https://github.com/rust-lang/rust/issues/54279

debugger_visualizer

allow use of nightly feature debugger_visualizer, will become useless once that is stabilized: https://github.com/rust-lang/rust/issues/95939

experimental_write_impl

EXPERIMENTAL: Not part of SemVer. It adds core::fmt::Write to ArrayVec and SliceVec. It works on Stable Rust, but Vec normally supports the std::io::Write trait instead of core::fmt::Write, so we're keeping it as an experimental impl only for now.

real_blackbox dev

Some benchmarks are optimized away with the stable black_box function which is based on read_volatile. This feature requires inline assembly and thus a nightly compiler, but is only used in benchmarks.

Enables real_blackbox of criterion ^0.3.0

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

tinyvec_macros alloc?
serde implicit feature

Enables serde

Provides Serialize and Deserialize implementations

arbitrary implicit feature

Enables arbitrary

Provides derived Arbitrary implementations