[package]
edition = "2021"
name = "peat-ffi"
version = "0.2.7"
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "FFI bindings for Peat protocol (Kotlin/Swift via UniFFI)"
readme = false
license = "Apache-2.0"
[features]
bluetooth = [
"peat-protocol/bluetooth",
"dep:peat-btle",
]
default = ["sync"]
lite-bridge = [
"sync",
"bluetooth",
"peat-mesh/lite-bridge",
]
sync = [
"peat-protocol/automerge-backend",
"dep:peat-mesh",
"peat-mesh/automerge-backend",
"dep:automerge",
]
[lib]
name = "peat_ffi"
crate-type = [
"staticlib",
"cdylib",
"lib",
]
path = "src/lib.rs"
[[bin]]
name = "uniffi-bindgen"
path = "src/uniffi_bindgen.rs"
[[example]]
name = "dual_test_peer"
path = "examples/dual_test_peer.rs"
required-features = [
"sync",
"bluetooth",
]
[[example]]
name = "iroh_test_peer"
path = "examples/iroh_test_peer.rs"
required-features = ["sync"]
[[example]]
name = "peat_cot_client"
path = "examples/peat_cot_client.rs"
required-features = ["sync"]
[[test]]
name = "jni_wrapper_integration"
path = "tests/jni_wrapper_integration.rs"
[dependencies.anyhow]
version = "1.0"
[dependencies.async-trait]
version = "0.1"
[dependencies.automerge]
version = "0.9.0"
optional = true
[dependencies.chrono]
version = "0.4"
[dependencies.hex]
version = "0.4"
[dependencies.jni]
version = "0.21"
[dependencies.peat-btle]
version = ">=0.4.0, <0.4.1"
optional = true
[dependencies.peat-mesh]
version = ">=0.9.0-rc.42, <0.9.1"
optional = true
default-features = false
[dependencies.peat-protocol]
version = "=0.9.0-rc.25"
default-features = false
[dependencies.serde_json]
version = "1.0"
[dependencies.tempfile]
version = "3"
[dependencies.thiserror]
version = "1.0"
[dependencies.tokio]
version = "1"
features = [
"rt-multi-thread",
"sync",
]
[dependencies.uniffi]
version = "0.31"
features = [
"cli",
"tokio",
]
[dev-dependencies.env_logger]
version = "0.11"
[dev-dependencies.jni]
version = "0.21"
features = ["invocation"]
[build-dependencies.uniffi]
version = "0.31"
features = ["build"]
[target.'cfg(target_os = "android")'.dependencies.ndk-context]
version = "0.1"
[target.'cfg(target_os = "android")'.dependencies.peat-btle]
version = ">=0.4.0, <0.4.1"
features = ["android"]
optional = true
[target.'cfg(target_os = "android")'.dependencies.tracing]
version = "0.1"
[target.'cfg(target_os = "android")'.dependencies.tracing-subscriber]
version = "0.3"
features = [
"env-filter",
"fmt",
]
[target.'cfg(target_os = "ios")'.dependencies.peat-btle]
version = ">=0.4.0, <0.4.1"
features = ["ios"]
optional = true
[target.'cfg(target_os = "linux")'.dependencies.peat-btle]
version = ">=0.4.0, <0.4.1"
features = ["linux"]
optional = true
[target.'cfg(target_os = "macos")'.dependencies.peat-btle]
version = ">=0.4.0, <0.4.1"
features = ["macos"]
optional = true
[target.'cfg(target_os = "windows")'.dependencies.peat-btle]
version = ">=0.4.0, <0.4.1"
features = ["windows"]
optional = true