# 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"
name = "jacquard-common"
version = "0.12.0"
authors = ["Orual <orual@nonbinary.computer>"]
build = false
exclude = [".direnv"]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Core AT Protocol types and utilities for Jacquard"
readme = "README.md"
keywords = [
    "atproto",
    "at",
    "bluesky",
    "api",
    "client",
]
categories = [
    "api-bindings",
    "web-programming::http-client",
]
license = "MPL-2.0"
repository = "https://tangled.org/nonbinary.computer/jacquard"
resolver = "2"

[package.metadata.docs.rs]
features = [
    "crypto-k256",
    "crypto-ed25519",
    "crypto-p256",
    "websocket",
    "zstd",
    "service-auth",
    "reqwest-client",
    "crypto",
]

[features]
crypto = []
crypto-ed25519 = [
    "crypto",
    "dep:ed25519-dalek",
]
crypto-k256 = [
    "crypto",
    "dep:k256",
    "k256/ecdsa",
]
crypto-p256 = [
    "crypto",
    "dep:p256",
    "p256/ecdsa",
]
default = [
    "std",
    "service-auth",
    "reqwest-client",
    "crypto",
    "reqwest-compression",
]
reqwest-client = [
    "std",
    "dep:reqwest",
]
reqwest-compression = [
    "reqwest/gzip",
    "reqwest/brotli",
    "reqwest/deflate",
]
service-auth = [
    "crypto-k256",
    "crypto-p256",
    "dep:signature",
]
std = [
    "dep:tokio",
    "dep:tokio-util",
    "dep:regex",
    "regex?/std",
    "rand/std",
    "rand/std_rng",
    "rand/os_rng",
    "rand/thread_rng",
    "serde_json/std",
    "serde/std",
    "postcard/use-std",
    "ciborium?/std",
    "ciborium-io?/std",
    "cid/std",
    "ipld-core/std",
    "multihash/std",
    "multibase/std",
    "serde_ipld_dagcbor/std",
    "serde_html_form/std",
    "miette",
    "dep:bon",
    "chrono/std",
    "chrono/clock",
    "http/std",
    "bytes/std",
    "oxilangtag/std",
    "serde_bytes/std",
]
streaming = [
    "n0-future",
    "futures",
    "reqwest/stream",
]
tracing = [
    "std",
    "dep:tracing",
]
websocket = [
    "streaming",
    "tokio-tungstenite-wasm",
    "dep:ciborium",
    "dep:ciborium-io",
]
zstd = ["dep:zstd"]

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

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

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

[dependencies.base64]
version = "0.22"
features = ["alloc"]
default-features = false

[dependencies.bon]
version = "3.8.0"
optional = true

[dependencies.bytes]
version = "1.11"
features = ["serde"]
default-features = false

[dependencies.chrono]
version = "0.4"
features = ["serde"]
default-features = false

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

[dependencies.ciborium-io]
version = "0.2.0"
optional = true
default-features = false

[dependencies.cid]
version = "0.11.1"
features = [
    "serde",
    "alloc",
]
default-features = false

[dependencies.ed25519-dalek]
version = "2"
features = ["pkcs8"]
optional = true
default-features = false

[dependencies.fluent-uri]
version = "0.4.1"
features = [
    "serde",
    "alloc",
    "impl-error",
]
default-features = false

[dependencies.futures]
version = "0.3"
features = ["alloc"]
optional = true
default-features = false

[dependencies.hashbrown]
version = "0.15"

[dependencies.http]
version = "1.4"
default-features = false

[dependencies.ipld-core]
version = "0.4.2"
features = ["serde"]
default-features = false

[dependencies.k256]
version = "0.13"
features = ["arithmetic"]
optional = true
default-features = false

[dependencies.maitake-sync]
version = "0.1"
default-features = false

[dependencies.miette]
version = "7.6"
optional = true

[dependencies.multibase]
version = "0.9.1"
default-features = false

[dependencies.multihash]
version = "0.19.3"
features = ["alloc"]
default-features = false

[dependencies.n0-future]
version = "0.1"
optional = true

[dependencies.oxilangtag]
version = "0.1"
features = [
    "alloc",
    "serde",
]
default-features = false

[dependencies.p256]
version = "0.13"
features = ["arithmetic"]
optional = true

[dependencies.phf]
version = "0.11"
features = ["macros"]

[dependencies.postcard]
version = "1.1.3"

[dependencies.rand]
version = "0.9.2"
features = ["alloc"]
default-features = false

[dependencies.regex]
version = "1.11.3"
features = ["perf-literal"]
optional = true
default-features = false

[dependencies.regex-automata]
version = "0.4"
features = [
    "alloc",
    "meta",
    "nfa-pikevm",
    "syntax",
]
default-features = false

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

[dependencies.rustversion]
version = "1.0"

[dependencies.serde]
version = "1.0"
features = [
    "derive",
    "alloc",
]
default-features = false

[dependencies.serde_bytes]
version = "0.11"
default-features = false

[dependencies.serde_html_form]
version = "0.3"
default-features = false

[dependencies.serde_ipld_dagcbor]
version = "0.6"
default-features = false

[dependencies.serde_json]
version = "1.0"
features = ["alloc"]
default-features = false

[dependencies.signature]
version = "2"
optional = true

[dependencies.smol_str]
version = "0.3"
features = ["serde"]

[dependencies.spin]
version = "0.10"
features = ["lazy"]
default-features = false

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

[dependencies.tokio]
version = "1"
features = ["sync"]
optional = true
default-features = false

[dependencies.tokio-tungstenite-wasm]
version = "0.4"
optional = true
default-features = false

[dependencies.tracing]
version = "0.1"
optional = true

[dependencies.trait-variant]
version = "0.1.2"

[dependencies.unicode-segmentation]
version = "1.12"

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

[dev-dependencies.futures-lite]
version = "2.6"

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

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.reqwest]
version = "0.12"
features = [
    "http2",
    "gzip",
    "system-proxy",
    "rustls-tls",
]
optional = true
default-features = false

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio-tungstenite-wasm]
version = "0.4"
features = ["rustls-tls-native-roots"]
optional = true

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio-util]
version = "0.7.16"
features = ["io"]
optional = true

[target.'cfg(target_family = "wasm")'.dependencies.chrono]
version = "0.4"
features = [
    "serde",
    "wasmbind",
]
default-features = false

[target.'cfg(target_family = "wasm")'.dependencies.getrandom]
version = "0.3.4"
features = ["wasm_js"]

[target.'cfg(target_family = "wasm")'.dependencies.getrandom_02]
version = "0.2"
features = ["js"]
package = "getrandom"

[target.'cfg(target_family = "wasm")'.dependencies.regex-lite]
version = "0.1"

[target.'cfg(target_family = "wasm")'.dependencies.reqwest]
version = "0.12"
features = [
    "json",
    "gzip",
    "rustls-tls-manual-roots",
]
optional = true
default-features = false

[target.'cfg(target_family = "wasm")'.dependencies.tokio-tungstenite-wasm]
version = "0.4"
features = []
optional = true
