mirror of
https://gitee.com/openharmony/third_party_rust_tinyvec
synced 2024-11-23 13:50:17 +00:00
91 lines
2.6 KiB
TOML
91 lines
2.6 KiB
TOML
[package]
|
|
name = "tinyvec"
|
|
description = "`tinyvec` provides 100% safe vec-like data structures."
|
|
version = "1.5.1"
|
|
authors = ["Lokathor <zefria@gmail.com>"]
|
|
edition = "2018"
|
|
license = "Zlib OR Apache-2.0 OR MIT"
|
|
keywords = ["vec", "no_std", "no-std"]
|
|
categories = ["data-structures", "no-std"]
|
|
repository = "https://github.com/Lokathor/tinyvec"
|
|
|
|
[dependencies]
|
|
tinyvec_macros = { version = "0.1", optional = true }
|
|
# Provides `Serialize` and `Deserialize` implementations
|
|
serde = { version = "1.0", optional = true, default-features = false }
|
|
# Provides derived `Arbitrary` implementations
|
|
arbitrary = { version = "1", optional = true }
|
|
|
|
[features]
|
|
default = []
|
|
|
|
# Provide things that utilize the `alloc` crate, namely `TinyVec`.
|
|
alloc = ["tinyvec_macros"]
|
|
|
|
# Provide things that require Rust's `std` module
|
|
std = []
|
|
|
|
# (not part of Vec!) Extra methods to let you grab the slice of memory after the
|
|
# "active" portion of an `ArrayVec` or `SliceVec`.
|
|
grab_spare_slice = []
|
|
|
|
# features that require rustc 1.40
|
|
# use Vec::append if possible in TinyVec::append - 1.37
|
|
# DoubleEndedIterator::nth_back - 1.40
|
|
rustc_1_40 = []
|
|
|
|
# features that require rustc 1.55
|
|
# use const generics to implement Array for all array lengths
|
|
rustc_1_55 = ["rustc_1_40"]
|
|
|
|
# allow use of nightly feature `slice_partition_dedup`,
|
|
# will become useless once that is stabilized:
|
|
# https://github.com/rust-lang/rust/issues/54279
|
|
nightly_slice_partition_dedup = []
|
|
|
|
# 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.
|
|
experimental_write_impl = []
|
|
|
|
# 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.
|
|
real_blackbox = ["criterion/real_blackbox"]
|
|
|
|
[package.metadata.docs.rs]
|
|
features = ["alloc", "std", "grab_spare_slice", "rustc_1_40", "rustc_1_55", "serde"]
|
|
rustdoc-args = ["--cfg","docs_rs"]
|
|
|
|
[package.metadata.playground]
|
|
features = ["alloc", "std", "grab_spare_slice", "rustc_1_40", "rustc_1_55", "serde"]
|
|
|
|
[profile.test]
|
|
opt-level = 3
|
|
|
|
[profile.bench]
|
|
debug = 2
|
|
|
|
[workspace]
|
|
members = ["fuzz"]
|
|
|
|
[dev-dependencies]
|
|
criterion = "0.3.0"
|
|
serde_test = "1.0"
|
|
smallvec = "1"
|
|
|
|
[[test]]
|
|
name = "tinyvec"
|
|
required-features = ["alloc", "std"]
|
|
|
|
[[bench]]
|
|
name = "macros"
|
|
harness = false
|
|
required-features = ["alloc"]
|
|
|
|
[[bench]]
|
|
name = "smallvec"
|
|
harness = false
|
|
required-features = ["alloc", "real_blackbox"]
|