• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[package]
2name = "tinyvec"
3description = "`tinyvec` provides 100% safe vec-like data structures."
4version = "1.6.0"
5authors = ["Lokathor <zefria@gmail.com>"]
6edition = "2018"
7license = "Zlib OR Apache-2.0 OR MIT"
8keywords = ["vec", "no_std", "no-std"]
9categories = ["data-structures", "no-std"]
10repository = "https://github.com/Lokathor/tinyvec"
11
12[dependencies]
13tinyvec_macros = { version = "0.1", optional = true }
14# Provides `Serialize` and `Deserialize` implementations
15serde = { version = "1.0", optional = true, default-features = false }
16# Provides derived `Arbitrary` implementations
17arbitrary = { version = "1", optional = true }
18
19[features]
20default = []
21
22# Provide things that utilize the `alloc` crate, namely `TinyVec`.
23alloc = ["tinyvec_macros"]
24
25# Provide things that require Rust's `std` module
26std = ["alloc"]
27
28# (not part of Vec!) Extra methods to let you grab the slice of memory after the
29# "active" portion of an `ArrayVec` or `SliceVec`.
30grab_spare_slice = []
31
32# features that require rustc 1.40
33# use Vec::append if possible in TinyVec::append - 1.37
34# DoubleEndedIterator::nth_back - 1.40
35rustc_1_40 = []
36
37# features that require rustc 1.55
38# use const generics to implement Array for all array lengths
39rustc_1_55 = ["rustc_1_40"]
40
41# features that require rustc 1.57
42# add try_reserve functions to types that heap allocate.
43rustc_1_57 = ["rustc_1_55"]
44
45# allow use of nightly feature `slice_partition_dedup`,
46# will become useless once that is stabilized:
47# https://github.com/rust-lang/rust/issues/54279
48nightly_slice_partition_dedup = []
49
50# EXPERIMENTAL: Not part of SemVer. It adds `core::fmt::Write` to `ArrayVec`
51# and `SliceVec`. It works on Stable Rust, but Vec normally supports the
52# `std::io::Write` trait instead of `core::fmt::Write`, so we're keeping it as
53# an experimental impl only for now.
54experimental_write_impl = []
55
56# Some benchmarks are optimized away with the stable black_box function
57# which is based on read_volatile. This feature requires inline assembly
58# and thus a nightly compiler, but is only used in benchmarks.
59real_blackbox = ["criterion/real_blackbox"]
60
61[package.metadata.docs.rs]
62features = ["alloc", "std", "grab_spare_slice", "rustc_1_40", "rustc_1_55", "serde"]
63rustdoc-args = ["--cfg","docs_rs"]
64
65[package.metadata.playground]
66features = ["alloc", "std", "grab_spare_slice", "rustc_1_40", "rustc_1_55", "serde"]
67
68[profile.test]
69opt-level = 3
70
71[profile.bench]
72debug = 2
73
74[workspace]
75members = ["fuzz"]
76
77[dev-dependencies]
78criterion = "0.3.0"
79serde_test = "1.0"
80smallvec = "1"
81
82[[test]]
83name = "tinyvec"
84required-features = ["alloc", "std"]
85
86[[bench]]
87name = "macros"
88harness = false
89required-features = ["alloc"]
90
91[[bench]]
92name = "smallvec"
93harness = false
94required-features = ["alloc", "real_blackbox"]
95