| 1 | [package] |
| 2 | name = "tinyvec" |
| 3 | description = "`tinyvec` provides 100% safe vec-like data structures." |
| 4 | version = "1.9.0" |
| 5 | authors = ["Lokathor <zefria@gmail.com>" ] |
| 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 | exclude = ["/.github" , "/*.py" , "/*.sh" , "/src-backup" ] |
| 12 | |
| 13 | [dependencies] |
| 14 | tinyvec_macros = { version = "0.1" , optional = true } |
| 15 | # Provides `Serialize` and `Deserialize` implementations |
| 16 | serde = { version = "1.0" , optional = true, default-features = false } |
| 17 | # Provides derived `Arbitrary` implementations |
| 18 | arbitrary = { version = "1" , optional = true } |
| 19 | # Provides `BorshSerialize` and `BorshDeserialize implementations |
| 20 | borsh = { version = "1.2.0" , optional = true, default-features = false } |
| 21 | # Implements the trait `Array` for `GenericArray` struct. |
| 22 | generic-array = { version = "1.1.1" , optional = true, default-features = false } |
| 23 | |
| 24 | |
| 25 | [features] |
| 26 | default = [] |
| 27 | |
| 28 | # Provide things that utilize the `alloc` crate, namely `TinyVec`. |
| 29 | alloc = ["tinyvec_macros" ] |
| 30 | |
| 31 | # Provide things that require Rust's `std` module |
| 32 | std = ["alloc" ] |
| 33 | |
| 34 | # (not part of Vec!) Extra methods to let you grab the slice of memory after the |
| 35 | # "active" portion of an `ArrayVec` or `SliceVec`. |
| 36 | grab_spare_slice = [] |
| 37 | |
| 38 | # obsolete feature that has to stay for semver reasons |
| 39 | rustc_1_40 = [] |
| 40 | |
| 41 | # features that require rustc 1.55 |
| 42 | # use const generics to implement Array for all array lengths |
| 43 | rustc_1_55 = ["rustc_1_40" ] |
| 44 | |
| 45 | # features that require rustc 1.57 |
| 46 | # add try_reserve functions to types that heap allocate. |
| 47 | rustc_1_57 = ["rustc_1_55" ] |
| 48 | |
| 49 | # features that require rustc 1.61 |
| 50 | # add retain_mut function to TinyVec |
| 51 | rustc_1_61 = ["rustc_1_57" ] |
| 52 | |
| 53 | # We're done with per-version featuring, this feature opts in to all the |
| 54 | # abilities of the latest release of Stable rust, and we don't need a million |
| 55 | # features forever now. |
| 56 | latest_stable_rust = ["rustc_1_61" ] |
| 57 | |
| 58 | # allow use of nightly feature `slice_partition_dedup`, |
| 59 | # will become useless once that is stabilized: |
| 60 | # https://github.com/rust-lang/rust/issues/54279 |
| 61 | nightly_slice_partition_dedup = [] |
| 62 | |
| 63 | # allow use of nightly feature `debugger_visualizer`, |
| 64 | # will become useless once that is stabilized: |
| 65 | # https://github.com/rust-lang/rust/issues/95939 |
| 66 | debugger_visualizer = [] |
| 67 | |
| 68 | # EXPERIMENTAL: Not part of SemVer. It adds `core::fmt::Write` to `ArrayVec` |
| 69 | # and `SliceVec`. It works on Stable Rust, but Vec normally supports the |
| 70 | # `std::io::Write` trait instead of `core::fmt::Write`, so we're keeping it as |
| 71 | # an experimental impl only for now. |
| 72 | experimental_write_impl = [] |
| 73 | |
| 74 | # Some benchmarks are optimized away with the stable black_box function |
| 75 | # which is based on read_volatile. This feature requires inline assembly |
| 76 | # and thus a nightly compiler, but is only used in benchmarks. |
| 77 | real_blackbox = ["criterion/real_blackbox" ] |
| 78 | |
| 79 | [package.metadata.docs.rs] |
| 80 | features = ["alloc" , "std" , "grab_spare_slice" , "latest_stable_rust" , "serde" , "borsh" ] |
| 81 | rustdoc-args = ["--cfg" ,"docs_rs" ] |
| 82 | |
| 83 | [package.metadata.playground] |
| 84 | features = ["alloc" , "std" , "grab_spare_slice" , "latest_stable_rust" , "serde" , "borsh" ] |
| 85 | |
| 86 | [profile.bench] |
| 87 | debug = 2 |
| 88 | |
| 89 | [workspace] |
| 90 | members = ["fuzz" ] |
| 91 | |
| 92 | [dev-dependencies] |
| 93 | criterion = "0.3.0" |
| 94 | serde_test = "1.0" |
| 95 | smallvec = "1" |
| 96 | debugger_test = "0.1" |
| 97 | debugger_test_parser = "0.1" |
| 98 | |
| 99 | [[test]] |
| 100 | name = "tinyvec" |
| 101 | required-features = ["alloc" , "std" ] |
| 102 | |
| 103 | [[bench]] |
| 104 | name = "macros" |
| 105 | harness = false |
| 106 | required-features = ["alloc" ] |
| 107 | |
| 108 | [[bench]] |
| 109 | name = "smallvec" |
| 110 | harness = false |
| 111 | required-features = ["alloc" , "real_blackbox" ] |
| 112 | |
| 113 | [[test]] |
| 114 | path = "tests/debugger_visualizer.rs" |
| 115 | name = "debugger_visualizer" |
| 116 | required-features = ["debugger_visualizer" ] |
| 117 | test = false |
| 118 | |