| 1 |
[package] |
| 2 |
name = "tinyvec" |
| 3 |
description = "`tinyvec` provides 100% safe vec-like data structures." |
| 4 |
version = "1.6.0" |
| 5 |
authors = ["Lokathor <[email protected]>"] |
| 6 |
edition = "2018" |
| 7 |
license = "Zlib OR Apache-2.0 OR MIT" |
| 8 |
keywords = ["vec", "no_std", "no-std"] |
| 9 |
categories = ["data-structures", "no-std"] |
| 10 |
repository = "https://github.com/Lokathor/tinyvec" |
| 11 |
|
| 12 |
[dependencies] |
| 13 |
tinyvec_macros = { version = "0.1", optional = true } |
| 14 |
# Provides `Serialize` and `Deserialize` implementations |
| 15 |
serde = { version = "1.0", optional = true, default-features = false } |
| 16 |
# Provides derived `Arbitrary` implementations |
| 17 |
arbitrary = { version = "1", optional = true } |
| 18 |
|
| 19 |
[features] |
| 20 |
default = [] |
| 21 |
|
| 22 |
# Provide things that utilize the `alloc` crate, namely `TinyVec`. |
| 23 |
alloc = ["tinyvec_macros"] |
| 24 |
|
| 25 |
# Provide things that require Rust's `std` module |
| 26 |
std = ["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`. |
| 30 |
grab_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 |
| 35 |
rustc_1_40 = [] |
| 36 |
|
| 37 |
# features that require rustc 1.55 |
| 38 |
# use const generics to implement Array for all array lengths |
| 39 |
rustc_1_55 = ["rustc_1_40"] |
| 40 |
|
| 41 |
# features that require rustc 1.57 |
| 42 |
# add try_reserve functions to types that heap allocate. |
| 43 |
rustc_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 |
| 48 |
nightly_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. |
| 54 |
experimental_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. |
| 59 |
real_blackbox = ["criterion/real_blackbox"] |
| 60 |
|
| 61 |
[package.metadata.docs.rs] |
| 62 |
features = ["alloc", "std", "grab_spare_slice", "rustc_1_40", "rustc_1_55", "serde"] |
| 63 |
rustdoc-args = ["--cfg","docs_rs"] |
| 64 |
|
| 65 |
[package.metadata.playground] |
| 66 |
features = ["alloc", "std", "grab_spare_slice", "rustc_1_40", "rustc_1_55", "serde"] |
| 67 |
|
| 68 |
[profile.test] |
| 69 |
opt-level = 3 |
| 70 |
|
| 71 |
[profile.bench] |
| 72 |
debug = 2 |
| 73 |
|
| 74 |
[workspace] |
| 75 |
members = ["fuzz"] |
| 76 |
|
| 77 |
[dev-dependencies] |
| 78 |
criterion = "0.3.0" |
| 79 |
serde_test = "1.0" |
| 80 |
smallvec = "1" |
| 81 |
|
| 82 |
[[test]] |
| 83 |
name = "tinyvec" |
| 84 |
required-features = ["alloc", "std"] |
| 85 |
|
| 86 |
[[bench]] |
| 87 |
name = "macros" |
| 88 |
harness = false |
| 89 |
required-features = ["alloc"] |
| 90 |
|
| 91 |
[[bench]] |
| 92 |
name = "smallvec" |
| 93 |
harness = false |
| 94 |
required-features = ["alloc", "real_blackbox"] |