# 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.94.1"
name = "exchange-apiws"
version = "0.9.0"
authors = ["nuniesmith"]
build = false
exclude = [
    "todo.md",
    "scripts/",
    "lint_report.md",
    "lint_report_bin",
    "/.github",
    "bots/",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Exchange REST and WebSocket clients — spot trading, futures, account management, and live data streams"
documentation = "https://docs.rs/exchange-apiws"
readme = "README.md"
keywords = [
    "kucoin",
    "crypto",
    "trading",
    "websocket",
    "futures",
]
categories = [
    "api-bindings",
    "network-programming",
    "asynchronous",
]
license = "MIT"
repository = "https://github.com/nuniesmith/exchange-apiws"

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

[features]
binance = []
bybit = []
coinbase = []
cryptocom = []
default = [
    "binance",
    "bybit",
    "kraken",
    "cryptocom",
    "coinbase",
    "okx",
]
kraken = []
okx = []
testutils = []

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

[[example]]
name = "binance_public_market"
path = "examples/binance_public_market.rs"
required-features = ["binance"]

[[example]]
name = "bybit_private_trading"
path = "examples/bybit_private_trading.rs"
required-features = ["bybit"]

[[example]]
name = "bybit_public_market"
path = "examples/bybit_public_market.rs"
required-features = ["bybit"]

[[example]]
name = "cryptocom_public_market"
path = "examples/cryptocom_public_market.rs"
required-features = ["cryptocom"]

[[example]]
name = "kraken_public_market"
path = "examples/kraken_public_market.rs"
required-features = ["kraken"]

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

[[example]]
name = "multi_exchange_aggregator"
path = "examples/multi_exchange_aggregator.rs"
required-features = [
    "binance",
    "bybit",
]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[dependencies.anyhow]
version = "1.0.102"

[dependencies.base64]
version = "0.22"

[dependencies.chrono]
version = "=0.4.45"
features = ["serde"]

[dependencies.futures-util]
version = "0.3.32"
features = [
    "sink",
    "std",
]
default-features = false

[dependencies.hmac]
version = "0.13"

[dependencies.reqwest]
version = "0.13.2"
features = [
    "json",
    "rustls-no-provider",
]
default-features = false

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

[dependencies.serde]
version = "1.0.228"
features = ["derive"]

[dependencies.serde_json]
version = "1.0.149"

[dependencies.sha2]
version = "0.11"

[dependencies.thiserror]
version = "2.0.18"

[dependencies.tokio]
version = "1.51.1"
features = [
    "rt-multi-thread",
    "macros",
    "time",
]

[dependencies.tokio-tungstenite]
version = "0.29.0"
features = ["rustls-tls-native-roots"]

[dependencies.tracing]
version = "0.1.44"

[dependencies.uuid]
version = "1.23.0"
features = ["v4"]

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

[dev-dependencies.tokio]
version = "1"
features = [
    "rt-multi-thread",
    "macros",
    "signal",
]

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

[dev-dependencies.wiremock]
version = "0.6"

[lints.clippy]
cast_lossless = "allow"
cast_possible_truncation = "allow"
cast_precision_loss = "allow"
cast_sign_loss = "allow"
doc_markdown = "allow"
duration_suboptimal_units = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
must_use_candidate = "allow"
needless_pass_by_value = "allow"
option_if_let_else = "allow"
too_many_arguments = "allow"

[lints.clippy.all]
level = "warn"
priority = -1

[lints.clippy.nursery]
level = "warn"
priority = -1

[lints.clippy.pedantic]
level = "warn"
priority = -1

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

[profile.ci]
lto = false
codegen-units = 256
inherits = "release"

[profile.dev]
opt-level = 0
debug = 2

[profile.release]
opt-level = 3
lto = "thin"
codegen-units = 16
debug = 0
panic = "abort"
strip = true

[profile.release-with-debug]
debug = 2
inherits = "release"
strip = false
