[package]
name = "dsq-core"
version = "0.1.0"
edition = "2021"
authors = ["Durable Programming LLC"]
description = "Core functionality for dsq - data processing with jq syntax"
license = "MIT OR Apache-2.0"
repository = "https://github.com/durableprogramming/dsq"
keywords = ["data", "jq", "query", "dataframe", "processing"]
categories = ["command-line-utilities", "data-structures"]

[lints]
workspace = true

[dependencies]

# Serialization
serde = { workspace = true }
serde_json = { workspace = true }

# Error handling
thiserror = { workspace = true }
anyhow = { workspace = true }

# Parsing and evaluation
nom = { workspace = true }

# Async runtime (for streaming)
futures = { workspace = true }

# Utilities
regex = { workspace = true }
indexmap = { workspace = true }
itertools = { workspace = true }
either = { workspace = true }

# Memory management
bytes = { workspace = true }
smallvec = { workspace = true }

# Logging
log = { workspace = true }

# CLI (optional)

# Local crates
dsq-formats = { version = "0.1.0", path = "../dsq-formats", default-features=false, features = ["csv", "json"] }
dsq-io = { version = "0.1.0", path = "../dsq-io", default-features=false }
dsq-parser = { version = "0.1.0", path = "../dsq-parser", default-features=false }
dsq-shared = { version = "0.1.0", path = "../dsq-shared", default-features=false }
dsq-filter = { version = "0.1.0", path = "../dsq-filter", default-features=false }
rand = { workspace = true, features = ["std_rng"] }

[dev-dependencies]
tempfile = { workspace = true }
criterion = { workspace = true }
proptest = { workspace = true }
pretty_assertions = { workspace = true }


[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { workspace = true, features = ["rt", "macros", "fs", "io-util"] }
polars = { workspace = true }
polars-ops = { version = "0.51", features = ["pivot"] }
dsq-filter = { version = "0.1.0", path = "../dsq-filter", features = ["rand"] }
dsq-formats = { version = "0.1.0", path = "../dsq-formats", features = ["csv", "json", "parquet", "avro"] }
once_cell = { workspace = true }
# Data processing
arrow = { workspace = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
polars = { workspace = true }
dsq-shared = { version = "0.1.0", path = "../dsq-shared", default-features=false, features = [] }
dsq-filter = { version = "0.1.0", path = "../dsq-filter", default-features=false, features = [] }
dsq-formats = { version = "0.1.0", path = "../dsq-formats", default-features=false, features = [] }

[features]
default = []
all-formats = ["csv", "json", "parquet", "avro"]
csv = []
json = []
parquet = []
avro = ["polars/avro"]
io = []
filter = []
repl = []
rand = []
