[package]
name = "fetsig"
version = "0.22.0"
authors = ["martin.kolarik@smartcontrol.cz"]
description = "Web-sys based browser fetch library using futures-signals with optional MAC."
edition = "2024"
license = "MIT OR Apache-2.0"
repository = "https://github.com/martin-kolarik/fetsig"
homepage = "https://github.com/martin-kolarik/fetsig"
rust-version = "1.91.0"

[features]
default = ["browser", "json", "postcard"]
browser = [
    "dep:js-sys",
    "dep:wasm-bindgen",
    "dep:wasm-bindgen-futures",
    "dep:web-sys",
]
json = ["dep:serde_json", "dep:serde_with"]
postcard = ["dep:postcard"]

[dependencies]
artwrap = { version = "^0.2" }
base64 = { version = "^0.22", default-features = false, features = ["std"] }
futures-signals = { version = "^0.3", default-features = false, features = [
    "serde",
] }
# futures-signals-ext = { git = "https://github.com/martin-kolarik/futures-signals-ext.git", default-features = false, features = [
#     "option",
#     "spawn-local",
# ] }
futures-signals-ext = { version = "^0.10", default-features = false, features = [
    "option",
    "spawn-local",
    "ahash",
] }
js-sys = { version = "^0.3", optional = true }
log = { version = "^0.4", default-features = false }
postcard = { version = "^1.0", optional = true }
serde = { version = "^1.0", features = ["derive"] }
serde_json = { version = "^1.0", optional = true }
serde_with = { version = "^3.6", default-features = false, features = [
    "macros",
], optional = true }
smol_str = { version = "^0.3", features = ["serde"] }
ufmt = { version = "^0.2", default-features = false, features = ["std"] }
wasm-bindgen = { version = "^0.2", default-features = false, optional = true }
wasm-bindgen-futures = { version = "^0.4", optional = true }
web-sys = { version = "^0.3", features = [
    "AbortController",
    "AbortSignal",
    "DomRect",
    "Element",
    "Headers",
    "File",
    "FileList",
    "ScreenOrientation",
    "RequestInit",
    "Response",
    "ResponseType",
    "Screen",
    "Storage",
    "Window",
], default-features = false, optional = true }
