[package]
name = "flashkraft"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
description = "FlashKraft — OS image writer desktop application (Iced GUI)"
readme = "README.md"
categories = ["gui", "command-line-utilities", "filesystem"]
keywords = ["imager", "disk", "usb", "iso", "flash"]

[lib]
name = "flashkraft_gui"
path = "src/lib.rs"

[[bin]]
name = "flashkraft"
path = "src/main.rs"

[dependencies]
# ── Shared core ───────────────────────────────────────────────────────────────
flashkraft-core = { workspace = true }

# ── GUI framework ─────────────────────────────────────────────────────────────
iced       = { workspace = true }
iced_aw    = { workspace = true }
iced_fonts = { workspace = true }
rfd        = { workspace = true }

# ── Async utilities ───────────────────────────────────────────────────────────
futures       = { workspace = true }
futures-timer = { workspace = true }

# ── Spinner glyphs (frame constants only — no TUI rendering) ─────────────────
tui-spinner   = { workspace = true }

# ── Storage / persistence ─────────────────────────────────────────────────────
serde      = { workspace = true }
serde_json = { workspace = true }
dirs       = { workspace = true }

[target.'cfg(target_os = "linux")'.dependencies]
# Explicitly enable both Wayland and X11 backends so the app works on any
# Linux display server without needing env vars pre-set at build time.
iced_winit = { version = "0.14", features = ["x11", "wayland"] }

# ── Build dependencies ────────────────────────────────────────────────────────
# winres embeds the UAC manifest into the Windows PE binary at compile time
# so Windows shows the Administrator elevation prompt on launch.
# It is NOT linked into the final binary — build-time only.
# The target gate means it is not even fetched on Linux / macOS.
[target.'cfg(target_os = "windows")'.build-dependencies]
winres = "0.1"

[dev-dependencies]
tempfile = { workspace = true }

[target.'cfg(unix)'.dependencies]
nix = { workspace = true }

# ── Examples ──────────────────────────────────────────────────────────────────
# These examples launch a full Iced GUI window and must not be executed as
# test harnesses by `cargo test --all-targets` — they would block forever.

[[example]]
name = "basic_usage"
test = false

[[example]]
name = "custom_theme"
test = false
