[package]
name = "ggsql-cli"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
description = "Command-line interface for ggsql"
build = "build.rs"

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

[dependencies]
ggsql = { workspace = true }

# CLI and error handling
clap.workspace = true
anyhow.workspace = true

# Serialization (used by `parse --format json`)
serde_json.workspace = true

# Regex (used by `docs` markdown post-processing)
regex.workspace = true

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
# Terminal markdown rendering for `ggsql docs` (native targets only;
# crossterm 0.29 doesn't compile on wasm32)
termimad = "0.31"

[build-dependencies]
regex.workspace = true
ureq = "3"

[features]
default = ["duckdb", "sqlite", "vegalite", "ipc", "parquet", "builtin-data", "odbc"]
ipc = ["ggsql/ipc"]
duckdb = ["ggsql/duckdb"]
parquet = ["ggsql/parquet"]
postgres = ["ggsql/postgres"]
sqlite = ["ggsql/sqlite"]
odbc = ["ggsql/odbc"]
vegalite = ["ggsql/vegalite"]
ggplot2 = ["ggsql/ggplot2"]
builtin-data = ["ggsql/builtin-data"]
all-readers = ["duckdb", "postgres", "sqlite", "odbc"]
all-writers = ["vegalite", "ggplot2"]

# cargo-packager configuration for cross-platform installers
[package.metadata.packager]
product-name = "ggsql"
identifier = "com.ggsql.app"
category = "DeveloperTool"
publisher = "ggsql Team"
authors = ["ggsql Team"]
icons = ["../doc/assets/logo.png"]
license-file = "../LICENSE.md"
out-dir = "target/release/packager"
homepage = "https://ggsql.org/"
description = "SQL extension for declarative data visualization"
long-description = "ggsql extends SQL with a VISUALISE clause for declarative data visualization based on Grammar of Graphics principles. Combine SQL queries with visualization specifications to create charts directly from your data."
copyright = "Copyright (c) 2026 ggsql Team"

# Binaries to include in the package
binaries = [
  { path = "ggsql", main = true },
  { path = "ggsql-jupyter", main = false },
]

# Resources to bundle (optional)
resources = [{ src = "../libs/", target = "libs" }]
