# 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.0"
name = "flare-core"
version = "1.0.1"
authors = ["Flare Team"]
build = "build.rs"
exclude = [
    "target/",
    "Cargo.lock",
    "examples/",
    "scripts/",
    "doc/",
    "certs/",
    ".git/",
    ".github/",
    "*.md",
    "!README.md",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A high-performance, reliable long-connection communication toolkit for Rust, supporting WebSocket and QUIC protocols with features like authentication, device management, serialization negotiation, and protocol racing."
homepage = "https://github.com/flare-im/flare-core"
documentation = "https://docs.rs/flare-core"
readme = "README.md"
keywords = [
    "websocket",
    "quic",
    "tokio",
    "realtime",
    "instant-messaging",
]
categories = [
    "network-programming",
    "asynchronous",
    "web-programming",
]
license = "MIT"
repository = "https://github.com/flare-im/flare-core"

[package.metadata.docs.rs]
all-features = true
targets = [
    "x86_64-unknown-linux-gnu",
    "wasm32-unknown-unknown",
]

[features]
client = []
compression-gzip = ["dep:flate2"]
default = [
    "client",
    "server",
    "websocket",
    "quic",
    "compression-gzip",
    "encryption-aes-gcm",
]
encryption-aes-gcm = ["dep:aes-gcm"]
full = [
    "client",
    "server",
    "websocket",
    "quic",
    "tcp",
    "compression-gzip",
    "encryption-aes-gcm",
]
quic = []
server = []
tcp = []
wasm = [
    "client",
    "websocket",
    "compression-gzip",
    "encryption-aes-gcm",
]
websocket = []

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

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

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

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

[[bench]]
name = "perf_baseline"
path = "benches/perf_baseline.rs"
harness = false
required-features = [
    "server",
    "compression-gzip",
]

[dependencies.aes-gcm]
version = "0.10"
optional = true

[dependencies.anyhow]
version = "1.0"

[dependencies.async-trait]
version = "0.1"

[dependencies.base32]
version = "0.4"

[dependencies.base64]
version = "0.22"

[dependencies.bytes]
version = "1"

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

[dependencies.flate2]
version = "1.0"
optional = true

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

[dependencies.hex]
version = "0.4"

[dependencies.lazy_static]
version = "1.4"

[dependencies.prost]
version = "0.14"

[dependencies.rand]
version = "0.8"

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

[dependencies.serde_json]
version = "1.0"

[dependencies.sha2]
version = "0.10"

[dependencies.thiserror]
version = "2.0"

[dependencies.tracing]
version = "0.1"

[dependencies.url]
version = "2.5"

[dev-dependencies]

[build-dependencies.prost-build]
version = "0.14"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.quinn]
version = "0.11"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.rcgen]
version = "0.14"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.rustls]
version = "0.23"
features = ["ring"]

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.rustls-pemfile]
version = "2"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio]
version = "1"
features = ["full"]

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio-tungstenite]
version = "0.28.0"
features = ["rustls-tls-webpki-roots"]

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.tracing-subscriber]
version = "0.3"
features = [
    "env-filter",
    "fmt",
]

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.ulid]
version = "1.1"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.webpki-roots]
version = "0.26"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.x509-parser]
version = "0.17"

[target.'cfg(target_arch = "wasm32")'.dependencies.futures-channel]
version = "0.3"

[target.'cfg(target_arch = "wasm32")'.dependencies.futures-util]
version = "0.3"
features = [
    "std",
    "async-await",
]
default-features = false

[target.'cfg(target_arch = "wasm32")'.dependencies.getrandom]
version = "0.2"
features = ["js"]

[target.'cfg(target_arch = "wasm32")'.dependencies.js-sys]
version = "0.3"

[target.'cfg(target_arch = "wasm32")'.dependencies.tokio]
version = "1"
features = [
    "sync",
    "macros",
    "rt",
    "time",
]
default-features = false

[target.'cfg(target_arch = "wasm32")'.dependencies.wasm-bindgen]
version = "0.2"

[target.'cfg(target_arch = "wasm32")'.dependencies.wasm-bindgen-futures]
version = "0.4"

[target.'cfg(target_arch = "wasm32")'.dependencies.wasmtimer]
version = "0.4"

[target.'cfg(target_arch = "wasm32")'.dependencies.web-sys]
version = "0.3"
features = [
    "WebSocket",
    "BinaryType",
    "MessageEvent",
    "CloseEvent",
    "ErrorEvent",
    "Blob",
    "console",
]

[target.'cfg(target_arch = "wasm32")'.dependencies.web-time]
version = "1.1"
