• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[package]
2name = "tinyvec"
3description = "`tinyvec` provides 100% safe vec-like data structures."
4version = "1.5.1"
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 = []
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# allow use of nightly feature `slice_partition_dedup`,
42# will become useless once that is stabilized:
43# https://github.com/rust-lang/rust/issues/54279
44nightly_slice_partition_dedup = []
45
46# EXPERIMENTAL: Not part of SemVer. It adds `core::fmt::Write` to `ArrayVec`
47# and `SliceVec`. It works on Stable Rust, but Vec normally supports the
48# `std::io::Write` trait instead of `core::fmt::Write`, so we're keeping it as
49# an experimental impl only for now.
50experimental_write_impl = []
51
52# Some benchmarks are optimized away with the stable black_box function
53# which is based on read_volatile. This feature requires inline assembly
54# and thus a nightly compiler, but is only used in benchmarks.
55real_blackbox = ["criterion/real_blackbox"]
56
57[package.metadata.docs.rs]
58features = ["alloc", "std", "grab_spare_slice", "rustc_1_40", "rustc_1_55", "serde"]
59rustdoc-args = ["--cfg","docs_rs"]
60
61[package.metadata.playground]
62features = ["alloc", "std", "grab_spare_slice", "rustc_1_40", "rustc_1_55", "serde"]
63
64[profile.test]
65opt-level = 3
66
67[profile.bench]
68debug = 2
69
70[workspace]
71members = ["fuzz"]
72
73[dev-dependencies]
74criterion = "0.3.0"
75serde_test = "1.0"
76smallvec = "1"
77
78[[test]]
79name = "tinyvec"
80required-features = ["alloc", "std"]
81
82[[bench]]
83name = "macros"
84harness = false
85required-features = ["alloc"]
86
87[[bench]]
88name = "smallvec"
89harness = false
90required-features = ["alloc", "real_blackbox"]
91