[package]
name = "juglans"
version = "0.2.15"
edition = "2021"
rust-version = "1.80"
default-run = "juglans"
description = "Compiler and runtime for Juglans Workflow Language"
license = "MIT"
repository = "https://github.com/juglans-ai/juglans"
homepage = "https://juglans.ai"
documentation = "https://docs.juglans.dev"
readme = "README.md"
authors = ["Juglans Team"]
keywords = ["workflow", "ai", "agent", "dsl", "orchestration"]
categories = ["command-line-utilities", "development-tools"]
exclude = ["docs/", "examples/", ".github/", "stdlib/"]

[[bin]]
name = "juglans"
path = "src/main.rs"
required-features = ["native", "cli"]

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
anyhow = "1.0"
lazy_static = "1.4"
regex = "1.10"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
uuid = { version = "1.0", features = ["v4", "v5", "serde", "js"] }
chrono = { version = "0.4", features = ["serde"] }
pest = "2.7"
pest_derive = "2.7"
petgraph = "0.6"
parking_lot = "0.12"
json-patch = "1.2"
glob = "0.3"
tracing = "0.1"
futures = "0.3"

# --- 2. WASM-only dependencies (wasm32 target only) ---
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
js-sys = "0.3"
serde-wasm-bindgen = "0.6"
getrandom = { version = "0.2", features = ["js"] }

# --- 3. Native-only dependencies (non-wasm32 targets) ---
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { version = "1.0", features = ["full"] }
reqwest = { version = "0.12", default-features = false, features = ["json", "stream", "rustls-tls", "multipart"] }
clap = { version = "4.4", features = ["derive"] }
toml = "0.8"
dotenvy = "0.15"
include_dir = "0.7"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
eventsource-stream = "0.2"
async-stream = "0.3"
async-trait = "0.1"
pathdiff = "0.2"
axum = { version = "0.7", features = ["multipart"] }
tower-http = { version = "0.5", features = ["cors", "trace"] }
# tokio-stream
tokio-stream = "0.1"
# Smart terminal input and rendering
crossterm = "0.28"
termimad = "0.30"
dashmap = "6"
semver = { version = "1.0", features = ["serde"] }
tar = "0.4"
flate2 = "1.0"
rusqlite = { version = "0.32", features = ["bundled"] }
sha2 = "0.10"
md-5 = "0.10"
base64 = "0.22"
urlencoding = "2"
rand = "0.9"
qrcode = "0.14"
aes = "0.8"
ecb = { version = "0.1", features = ["alloc"] }
hex = "0.4"
# TUI
ratatui = "0.29"
arboard = "3"
tui-textarea = "0.7"
unicode-width = "0.2"
sqlx = { version = "0.8.1", features = ["runtime-tokio-rustls", "postgres", "sqlite", "mysql", "any", "json", "chrono", "uuid"] }
async-openai = "0.23"
thiserror = "1.0"
tower-lsp = "0.20"
cron = "0.15"
notify = "7"
enigo = { version = "0.3", optional = true }
rdev = { version = "0.5", optional = true }
xcap = { version = "0.8", optional = true }

[dev-dependencies]
criterion = { version = "0.5", features = ["html_reports"] }

[[bench]]
name = "class_perf"
harness = false

[features]
default = ["native", "device", "cli"]
native = []
device = ["dep:enigo", "dep:rdev", "dep:xcap"]
# cli: enables bundled scaffolding (examples/, docs/) via include_dir!.
# Required by the `juglans` binary; library consumers typically omit this
# (set default-features = false) because the `examples/` and `docs/`
# directories are excluded from the published crate tarball.
cli = []