# 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.85"
name = "nng-core"
version = "0.3.0"
authors = ["Brian Rogoff <brogoff@gmail.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Pure-Rust implementation of the NNG Scalability Protocols"
readme = "README.md"
keywords = [
    "nng",
    "nanomsg",
    "zeromq",
    "zmq",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/bpr/nng-core"

[features]
default = ["std"]
kcp = [
    "std",
    "dep:kcp-tokio",
]
quic = [
    "std",
    "dep:quinn",
    "dep:rustls",
    "dep:rustls-pemfile",
    "dep:rustls-native-certs",
]
std = [
    "dep:tokio",
    "embedded-io-async/std",
]
streams = [
    "std",
    "dep:futures-core",
    "dep:futures-sink",
    "dep:futures-util",
]
tls-tcp = [
    "std",
    "dep:tokio-rustls",
    "dep:rustls",
    "dep:rustls-pemfile",
    "dep:rustls-native-certs",
]
tower = [
    "std",
    "dep:tower-service",
]
udp = ["std"]
vsock = [
    "std",
    "dep:tokio-vsock",
]
ws = [
    "std",
    "dep:tokio-tungstenite",
    "dep:futures-util",
]
wss = [
    "ws",
    "tokio-tungstenite/rustls-tls-native-roots",
    "dep:tokio-rustls",
    "dep:rustls",
    "dep:rustls-pemfile",
]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[[example]]
name = "quic_reqrep"
path = "examples/quic_reqrep.rs"
required-features = ["quic"]

[[example]]
name = "req-rep"
path = "examples/req-rep.rs"

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[[test]]
name = "req-rep"
path = "tests/req-rep.rs"

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[dependencies.embedded-io-async]
version = "0.7"

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

[dependencies.futures-sink]
version = "0.3"
optional = true

[dependencies.futures-util]
version = "0.3"
features = ["sink"]
optional = true

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

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

[dependencies.rustls]
version = "0.23"
features = ["std"]
optional = true
default-features = false

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

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

[dependencies.thiserror]
version = "2"
default-features = false

[dependencies.tokio]
version = "1"
features = [
    "net",
    "sync",
    "rt",
    "io-util",
    "macros",
    "time",
]
optional = true

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

[dependencies.tokio-tungstenite]
version = "0.29.0"
optional = true

[dependencies.tokio-vsock]
version = "0.7"
optional = true

[dependencies.tower-service]
version = "0.3"
optional = true

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

[dev-dependencies.futures-util]
version = "0.3"

[dev-dependencies.proptest]
version = "1"

[dev-dependencies.proptest-state-machine]
version = "0.3"

[dev-dependencies.rcgen]
version = "0.14"

[dev-dependencies.tempfile]
version = "3"

[dev-dependencies.tokio]
version = "1"
features = ["full"]

[dev-dependencies.tower-service]
version = "0.3"

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