# 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 = "2024"
rust-version = "1.88"
name = "krafka"
version = "0.8.0"
authors = ["hupe1980"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A pure Rust, async-native Apache Kafka client"
documentation = "https://docs.rs/krafka"
readme = "README.md"
keywords = [
    "kafka",
    "async",
    "streaming",
    "messaging",
]
categories = [
    "network-programming",
    "asynchronous",
]
license = "MIT"
repository = "https://github.com/hupe1980/krafka"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[features]
aws-glue-schema-registry = [
    "dep:aws-sdk-glue",
    "dep:aws-config",
]
aws-msk = [
    "dep:aws-config",
    "dep:aws-credential-types",
]
compression = [
    "gzip",
    "snappy",
    "lz4",
]
compression-all = [
    "compression",
    "zstd",
]
danger-insecure-tls = []
default = ["compression"]
gzip = []
lz4 = ["dep:lz4_flex"]
native-tls-roots = ["dep:rustls-native-certs"]
schema-registry = [
    "dep:reqwest",
    "dep:serde",
    "dep:serde_json",
]
snappy = ["dep:snap"]
socks5 = ["dep:tokio-socks"]
telemetry = []
unstable-protocol = []
zstd = ["dep:zstd"]

[lib]
name = "krafka"
path = "src/lib.rs"

[[example]]
name = "admin"
path = "examples/admin.rs"

[[example]]
name = "authentication"
path = "examples/authentication.rs"

[[example]]
name = "consumer"
path = "examples/consumer.rs"

[[example]]
name = "consumer_advanced"
path = "examples/consumer_advanced.rs"

[[example]]
name = "producer"
path = "examples/producer.rs"

[[example]]
name = "transactional_producer"
path = "examples/transactional_producer.rs"

[[test]]
name = "integration_tests"
path = "tests/integration_tests.rs"

[[test]]
name = "sasl_integration_tests"
path = "tests/sasl_integration_tests.rs"

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

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

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

[dependencies.arc-swap]
version = "1.9.0"

[dependencies.aws-config]
version = "1"
optional = true

[dependencies.aws-credential-types]
version = "1"
optional = true

[dependencies.aws-sdk-glue]
version = "1"
optional = true

[dependencies.base64]
version = "0.22"

[dependencies.bytes]
version = "1"

[dependencies.crc32c]
version = "0.6"

[dependencies.flate2]
version = "1"

[dependencies.futures-core]
version = "0.3"

[dependencies.hmac]
version = "0.12"

[dependencies.lz4_flex]
version = "0.11"
optional = true

[dependencies.parking_lot]
version = "0.12"

[dependencies.pbkdf2]
version = "0.12"
features = ["hmac"]
default-features = false

[dependencies.rand]
version = "0.9"

[dependencies.reqwest]
version = "0.12"
features = [
    "json",
    "rustls-tls",
]
optional = true
default-features = false

[dependencies.rustls]
version = "0.23"
features = [
    "std",
    "tls12",
    "ring",
]
default-features = false

[dependencies.rustls-native-certs]
version = "0.8"
optional = true

[dependencies.rustls-pemfile]
version = "2"

[dependencies.serde]
version = "1"
features = ["derive"]
optional = true

[dependencies.serde_json]
version = "1"
optional = true

[dependencies.sha2]
version = "0.10"

[dependencies.snap]
version = "1"
optional = true

[dependencies.socket2]
version = "0.5"

[dependencies.subtle]
version = "2"

[dependencies.thiserror]
version = "2"

[dependencies.time]
version = "0.3"
features = [
    "std",
    "parsing",
    "macros",
]
default-features = false

[dependencies.tokio]
version = "1.26"
features = [
    "rt-multi-thread",
    "net",
    "io-util",
    "time",
    "sync",
    "macros",
]

[dependencies.tokio-rustls]
version = "0.26"

[dependencies.tokio-socks]
version = "0.5"
optional = true

[dependencies.tokio-util]
version = "0.7"
features = ["time"]
default-features = false

[dependencies.tracing]
version = "0.1"

[dependencies.webpki-roots]
version = "0.26"

[dependencies.zeroize]
version = "1.8"
features = ["derive"]

[dependencies.zstd]
version = "0.13"
optional = true

[dev-dependencies.criterion]
version = "0.5"
features = ["async_tokio"]

[dev-dependencies.rstest]
version = "0.25"

[dev-dependencies.testcontainers]
version = "0.27"

[dev-dependencies.tokio-test]
version = "0.4"

[dev-dependencies.tracing-subscriber]
version = "0.3"
features = ["env-filter"]

[lints.clippy]
expect_used = "warn"
panic = "warn"
undocumented_unsafe_blocks = "warn"
unwrap_used = "warn"

[lints.rust]
missing_docs = "warn"
unsafe_code = "deny"

[lints.rust.rust_2018_idioms]
level = "warn"
priority = -1

[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = ["cfg(docsrs)"]

[profile.release]
lto = true
codegen-units = 1
