[package]
name = "tauri-plugin-native-bridge"
version = "0.1.0"
authors = [ "You" ]
description = "a bridge between tauri app and native OS functionality"
edition = "2021"
# `keyring-core` v1 and the per-platform store crates require Rust
# 1.85 (apple-native) / 1.88 (windows-native, dbus-secret-service).
# Bumping the floor here so cargo lets them compile.
rust-version = "1.88"
exclude = ["/examples", "/dist-js", "/guest-js", "/node_modules"]
links = "tauri-plugin-native-bridge"

[dependencies]
tauri = { version = "2" }
serde = "1.0"
thiserror = "2"
schemars = "0.8"

[dev-dependencies]
serde_json = "1"

[build-dependencies]
tauri-plugin = { version = "2", features = ["build"] }
schemars = "0.8"

[target.'cfg(any(target_os = "macos", windows, target_os = "linux"))'.dependencies]
font-enumeration = "0.9.0"
# OS-keychain backed secret storage for the sync passphrase. The
# `keyring` crate v4 was demoted to a sample CLI app; the library
# moved to `keyring-core` v1 plus a separate per-platform credential
# store crate. We register the right store at plugin init time
# (see `desktop.rs`). iOS / Android take a different path entirely:
# Swift's Security framework + Android's EncryptedSharedPreferences,
# dispatched via mobile.rs.
keyring-core = "1"

[target.'cfg(target_os = "macos")'.dependencies]
apple-native-keyring-store = { version = "1", features = ["keychain"] }
# WKWebView snapshot for the mesh page-curl texture (#555) — same
# dynamic-ObjC stack the main app's `src/macos/` modules use.
objc = "0.2.7"
cocoa = "0.25"
block = "0.1.6"

[target.'cfg(any(target_os = "ios", target_os = "android"))'.dependencies]
# The Swift/Kotlin plugin boundary is JSON-only, so webview snapshots
# arrive base64-encoded and are decoded back to bytes in mobile.rs.
base64 = "0.22"

[target.'cfg(target_os = "windows")'.dependencies]
windows-native-keyring-store = "1"

[target.'cfg(target_os = "linux")'.dependencies]
# `vendored` statically links libdbus + openssl so we don't depend on
# the host distribution's versions, mirroring the previous
# `sync-secret-service` feature on keyring v3.
dbus-secret-service-keyring-store = { version = "1", features = ["crypto-rust", "vendored"] }
