[package]
name = "darkfi-app"
description = "DarkFi UI App"
version = "0.1.0"
edition = "2021"
authors = ["Dyne.org foundation <foundation@dyne.org>"]
license = "AGPL-3.0-only"
homepage = "https://dark.fi"
repository = "https://codeberg.org/darkrenaissance/darkfi"

[dependencies]
miniquad = { git = "https://github.com/not-fl3/miniquad" }

image = "0.25.9"
qoi = "0.4.1"

tracing = "0.1.44"
glam = "0.30.9"
#zmq = "0.10.0"
#async_zmq = "0.4.0"
zeromq = { version = "0.4.1", default-features = false, features = ["async-std-runtime", "all-transport"] }
darkfi = {path = "../../", features = ["async-daemonize", "event-graph", "net", "util", "system", "zk"]}
#darkfi-sdk = {path = "../../src/sdk", features = ["async"]}
darkfi-serial = {path = "../../src/serial", features = ["async"]}
fud = { path = "../fud/fud/" }
bs58 = "0.5.1"
thiserror = "2.0.17"
smol = "2.0.2"
atomic_float = "1.1.0"
async-channel = "2.5.0"
easy-parallel = "3.3.1"
rand = "0.8.5"
async-lock = "3.4.2"
async-broadcast = "0.7.2"
futures = "0.3.31"
async-recursion = "1.1.1"
colored = "3.0.0"
#rustpython-vm = "0.3.1"
sled-overlay = "0.1.20"
url = "2.5.7"
semver = "1.0.27"
chrono = "0.4.42"
async-gen = "0.2.3"
async-trait = "0.1.89"
blake3 = "1.8.2"
clap = { version = "4.5.53", features = ["derive"] }
tracing-subscriber = { version = "0.3.22", default-features = false, features = ["fmt"] }
tracing-appender = "0.2.4"
# For log files
file-rotate = "0.8.0"
parking_lot = { version = "0.12.5", features = ["nightly"] }
regex = "1.12.2"
parley = { git = "https://github.com/linebender/parley.git" }
swash = "0.2.6"
zeno = "0.3.3"
peniko = "0.5.0"

fluent = "0.17.0"
unic-langid = { version = "0.9.6", features = ["unic-langid-macros"] }
indoc = "2.0.7"

# This makes a HUGE difference to decoding speed.
# Over 160s to like 2s.
[profile.dev.package.rav1d]
opt-level = 3

[features]
default = ["enable-plugins", "schema-app"]
emulate-android = []
enable-plugins = []
enable-filelog = []
# Network debugging. Should be disabled in release.
enable-netdebug = []

# Main app schema layout
schema-app = []
# Dev schema for testing
schema-test = []
schema-test-scroll-layer = []

[patch.crates-io]
halo2_proofs = { git="https://github.com/parazyd/halo2", branch="v032" }
halo2_gadgets = { git="https://github.com/parazyd/halo2", branch="v032" }
# This patch didn't work for me
#dirs-sys = {git="https://github.com/sbechet/dirs-sys-rs.git"}

[target.'cfg(not(target_os = "android"))'.dependencies]
dirs = "5.0.1"
# AV1 video decoding - rav1d with Rust API from leo030303 fork
# Enable ASM routines for non-Android platforms.
rav1d = { git = "https://github.com/leo030303/rav1d", branch = "add-rust-api", features = ["bitdepth_8"] }

[target.'cfg(target_os = "android")'.dependencies]
tracing-android = "0.2.0"
# Required by Arti: tor-dirmgr
tor-dirmgr = { version="0.37.0", features=["static"] }
# Android uses MediaCodec for hardware-accelerated H.264 decoding instead of rav1d

[target.'cfg(target_os = "windows")'.dependencies]
# Used by tor-dirmgr
#rusqlite = {version = "0.37.0", features = ["bundled"]}
tor-dirmgr = { version="0.37.0", features=["static"] }

[package.metadata.android.activity_attributes]
"android:exported" = "true"
"android:windowSoftInputMode" = "adjustResize"

[lints]
workspace = true

[workspace.lints.clippy]

[package.metadata.android]
package_name = "darkfi.darkfi-app"
label = "DarkFi"
res = "data/res"
icon = "@mipmap/ic_launcher"
assets = "assets"
build_targets = ["aarch64-linux-android", "x86_64-linux-android"]

[[package.metadata.android.permission]]
name = "android.permission.INTERNET"
[[package.metadata.android.permission]]
name = "android.permission.ACCESS_NETWORK_STATE"
[[package.metadata.android.permission]]
name = "android.permission.FOREGROUND_SERVICE"
[[package.metadata.android.permission]]
name = "android.permission.FOREGROUND_SERVICE_REMOTE_MESSAGING"

[[package.metadata.android.service]]
name = ".ForegroundService"
foreground_service_type = "remoteMessaging"
exported = false
