[package]
name = "mold-ai"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
readme.workspace = true
keywords.workspace = true
categories.workspace = true
description = "Local AI image generation CLI — FLUX, SDXL, SD3.5, Z-Image diffusion models on your GPU"

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

[features]
default = []
cuda = ["mold-server/cuda", "mold-inference/cuda", "mold-tui?/cuda"]
metal = ["mold-server/metal", "mold-inference/metal", "mold-tui?/metal"]
# FlashAttention v2 path for FLUX/FLUX2. Implies `cuda` via mold-inference.
flash-attn = ["mold-inference/flash-attn"]
preview = ["viuer"]
discord = ["mold-discord"]
expand = ["mold-inference/expand", "mold-server/expand", "mold-tui?/expand"]
tui = ["dep:mold-tui"]
webp = ["mold-inference/webp"]
mp4 = ["mold-inference/mp4", "mold-server/mp4"]
metrics = ["mold-server/metrics"]

[dependencies]
mold-core = { path = "../mold-core", package = "mold-ai-core", version = "0.12.1" }
mold-catalog = { path = "../mold-catalog", package = "mold-ai-catalog", version = "0.12.1" }
mold-db = { path = "../mold-db", package = "mold-ai-db", version = "0.12.1" }
mold-inference = { path = "../mold-inference", package = "mold-ai-inference", version = "0.12.1" }
mold-server = { path = "../mold-server", package = "mold-ai-server", version = "0.12.1" }
anyhow = "1"
base64 = "0.22"
clap = { version = "4", features = ["derive", "env", "unstable-ext"] }
clap_complete = { version = "4", features = ["unstable-dynamic"] }
colored = "3"
ctrlc = "3"
image = "0.25"
libc = "0.2"
dirs = "6"
flate2 = "1"
indicatif = "0.17"
rand = "0.8"
reqwest = { version = "0.12", features = ["json", "rustls-tls", "stream"], default-features = false }
rusqlite = { version = "0.31", features = ["bundled"] }
serde_json = "1"
serde = { version = "1", features = ["derive"] }
sysinfo = "0.34"
tar = "0.4"
sha2 = "0.10"
time = { version = "0.3", features = ["formatting", "macros"] }
tokio = { version = "1", features = ["full"] }
toml = "0.8"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
hostname = "0.4"
viuer = { version = "0.11", optional = true }
mold-discord = { path = "../mold-discord", package = "mold-ai-discord", version = "0.12.1", optional = true }
mold-tui = { path = "../mold-tui", package = "mold-ai-tui", version = "0.12.1", optional = true }
walkdir = "2.5.0"

[dev-dependencies]
assert_cmd = "2"
filetime = "0.2"
predicates = "3"
rusqlite = { version = "0.31", features = ["bundled"] }
tempfile = "3"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
wiremock = "0.6"
