[package]
name = "bdk-ffi"
version = "1.0.0-alpha.9"
homepage = "https://bitcoindevkit.org"
repository = "https://github.com/bitcoindevkit/bdk"
edition = "2018"
license = "MIT OR Apache-2.0"

[lib]
crate-type = ["lib", "staticlib", "cdylib"]
name = "bdkffi"

[[bin]]
name = "uniffi-bindgen"
path = "uniffi-bindgen.rs"

[features]
default = ["uniffi/cli"]

[dependencies]
bdk = { version = "1.0.0-alpha.9", features = ["all-keys", "keys-bip39"] }
bdk_esplora = { version = "0.11.0", default-features = false, features = ["std", "blocking"] }
esplora-client = { version = "0.7.0", default-features = false, features = ["blocking-https-rustls"] }
# bdk_esplora = { version = "0.10.0", default-features = false, features = ["std", "blocking", "async-https-rustls"] }
bdk_file_store = { version = "0.9.0" }

uniffi = { version = "=0.26.1" }
bitcoin-internals = { version = "0.2.0", features = ["alloc"] }
thiserror = "1.0.58"

[build-dependencies]
uniffi = { version = "=0.26.1", features = ["build"] }

[dev-dependencies]
uniffi = { version = "=0.26.1", features = ["bindgen-tests"] }
assert_matches = "1.5.0"

[profile.release-smaller]
inherits = "release"
opt-level = 'z'     # Optimize for size.
lto = true          # Enable Link Time Optimization
codegen-units = 1   # Reduce number of codegen units to increase optimizations.
panic = "abort"     # Abort on panic
strip = "debuginfo" # Partially strip symbols from binary
