# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
rust-version = "1.83"
name = "zerovec"
version = "0.11.6"
authors = ["The ICU4X Project Developers"]
build = false
include = [
    "data/**/*",
    "src/**/*",
    "examples/**/*",
    "benches/**/*",
    "tests/**/*",
    "Cargo.toml",
    "LICENSE",
    "README.md",
    "build.rs",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Zero-copy vector backed by a byte array"
readme = "README.md"
keywords = [
    "zero-copy",
    "serialization",
    "memory-efficiency",
    "serde",
]
categories = [
    "rust-patterns",
    "memory-management",
    "caching",
    "no-std",
    "data-structures",
]
license = "Unicode-3.0"
repository = "https://github.com/unicode-org/icu4x"

[package.metadata.workspaces]
independent = true

[package.metadata.docs.rs]
all-features = true

[package.metadata.cargo-all-features]
max_combination_size = 3

[features]
alloc = ["serde?/alloc"]
databake = ["dep:databake"]
derive = ["dep:zerovec-derive"]
hashmap = [
    "dep:twox-hash",
    "alloc",
]
schemars = [
    "dep:schemars",
    "alloc",
]
serde = ["dep:serde"]
std = []
yoke = ["dep:yoke"]

[lib]
name = "zerovec"
path = "src/lib.rs"
bench = false

[[example]]
name = "zv_serde"
path = "examples/zv_serde.rs"
required-features = ["serde"]

[[bench]]
name = "vzv"
path = "benches/vzv.rs"
harness = false

[[bench]]
name = "zeromap"
path = "benches/zeromap.rs"
harness = false
required-features = [
    "serde",
    "hashmap",
    "derive",
]

[[bench]]
name = "zerovec"
path = "benches/zerovec.rs"
harness = false

[[bench]]
name = "zerovec_iai"
path = "benches/zerovec_iai.rs"
harness = false

[[bench]]
name = "zerovec_serde"
path = "benches/zerovec_serde.rs"
harness = false
required-features = ["serde"]

[dependencies.databake]
version = "0.2.0"
features = ["derive"]
optional = true
default-features = false

[dependencies.schemars]
version = "1.0.4"
optional = true
default-features = false

[dependencies.serde]
version = "1.0.220"
features = ["derive"]
optional = true
default-features = false

[dependencies.twox-hash]
version = "2.0.0"
features = ["xxhash64"]
optional = true
default-features = false

[dependencies.yoke]
version = "0.8.2"
optional = true
default-features = false

[dependencies.zerofrom]
version = "0.1.6"
default-features = false

[dependencies.zerovec-derive]
version = "0.11.3"
optional = true
default-features = false

[dev-dependencies.bincode]
version = "1.3.1"

[dev-dependencies.getrandom]
version = "0.3"
features = ["wasm_js"]

[dev-dependencies.iai]
version = "0.1.1"

[dev-dependencies.insta]
version = "1.43.2"
features = ["json"]

[dev-dependencies.postcard]
version = "1.0.3"
features = ["use-std"]
default-features = false

[dev-dependencies.rand]
version = "0.9"

[dev-dependencies.rand_distr]
version = "0.5"

[dev-dependencies.rand_pcg]
version = "0.9"

[dev-dependencies.rmp-serde]
version = "1.2.0"

[dev-dependencies.serde]
version = "1.0.220"
features = ["derive"]
default-features = false

[dev-dependencies.serde_json]
version = "1.0.45"

[dev-dependencies.yoke]
version = "0.8.2"
features = ["derive"]
default-features = false

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies.criterion]
version = "0.5.0"

[lints.clippy]
alloc-instead-of-core = "warn"
branches-sharing-code = "warn"
collection_is_never_read = "warn"
crosspointer_transmute = "warn"
dbg_macro = "warn"
debug_assert_with_mut_call = "warn"
doc_markdown = "warn"
exhaustive_enums = "deny"
exhaustive_structs = "deny"
fn_to_numeric_cast_any = "warn"
infinite_loop = "warn"
large_stack_arrays = "warn"
mismatching_type_param_order = "warn"
missing_fields_in_debug = "warn"
missing_transmute_annotations = "warn"
negative_feature_names = "warn"
or-fun-call = "warn"
same_functions_in_if_condition = "warn"
todo = "warn"
transmute_bytes_to_str = "warn"
transmute_int_to_bool = "warn"
transmute_int_to_non_zero = "warn"
transmute_ptr_to_ptr = "warn"
transmute_ptr_to_ref = "warn"
transmute_undefined_repr = "warn"
transmutes_expressible_as_ptr_casts = "warn"
trivially_copy_pass_by_ref = "deny"
unnecessary-wraps = "warn"
useless_transmute = "warn"
wildcard_dependencies = "warn"

[lints.rust]
missing_debug_implementations = "deny"
trivial_numeric_casts = "deny"
unused_lifetimes = "warn"
unused_macro_rules = "warn"
unused_qualifications = "warn"

[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = [
    "cfg(icu4c_enable_renaming)",
    "cfg(needs_alloc_error_handler)",
    "cfg(icu4x_run_size_tests)",
    "cfg(icu4x_unstable_fast_trie_only)",
]
