[package]
name = "pubky-app-specs"
version = "0.5.3"
edition = "2021"
rust-version = "1.89"
description = "Pubky.app Data Model Specifications"
homepage = "https://pubky.app"
repository = "https://github.com/pubky/pubky-app-specs"
license = "MIT"
documentation = "https://github.com/pubky/pubky-app-specs"
exclude = [
    ".github",
    "pkg",
    "test",
    "build.sh"
]

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.145"
url = "2.5.8"
base32 = "0.5.1"
blake3 = "1.8.5"
mime = "0.3"
utoipa = { version = "5.5.0", optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "0.2.100"
serde-wasm-bindgen = "0.6.5"
js-sys = "0.3.77"
web-sys = "0.3.77"
tsify-next = { version = "0.5.6", default-features = false, features = ["js"] }

[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = "0.3.68"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
pubky = "0.9.1"

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
tokio = { version = "1.52.3", features = ["full"] }
anyhow = "1.0.100"

[features]
openapi = ["utoipa"]

[profile.release]
opt-level = "z"   # Requests maximum optimization for binary size (“z” stands for “size”), rather than speed.
lto = true        # Enables link-time optimization, allowing the compiler to do more aggressive inlining/dead-code elimination across crates.
codegen-units = 1 # Forces compilation into a single code-generation unit, further helping inlining and dead-code elimination at link time.
panic = "abort"   # Ensures panics do not generate extra stack-unwinding code, reducing binary bloat. Panics will simply abort execution.
