[package]
name = "bashrs"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
description.workspace = true
readme.workspace = true
homepage.workspace = true
documentation.workspace = true
keywords.workspace = true
categories.workspace = true

[lints]
workspace = true

[[bin]]
name = "bashrs"
path = "src/bin/bashrs.rs"

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

[dependencies]
syn.workspace = true
quote.workspace = true
proc-macro2.workspace = true
serde.workspace = true
serde_json.workspace = true
toml = "0.8"  # For formatter configuration
anyhow.workspace = true
thiserror.workspace = true
clap = { workspace = true, optional = true }
tokio = { workspace = true, optional = true }
tracing.workspace = true
tracing-subscriber = { workspace = true, optional = true }
blake3.workspace = true
once_cell.workspace = true
lazy_static.workspace = true
phf.workspace = true
chrono = { version = "0.4", features = ["serde"] }
rand = "0.9"  # Added for testing module
static_assertions = "1.1"
regex = "1.10"  # For linter pattern matching
glob = "0.3"    # For .bashrsignore pattern matching (Issue #58)
rustyline.workspace = true  # REPL terminal line editing
sysinfo = "0.31"  # For bench command - CPU/RAM/OS detection
schemars = "0.8"  # For JSON schema generation (Issue #12)
# bashrs-oracle = { path = "../bashrs-oracle", optional = true }  # ML-powered error classification (publish separately)

# Compile mode dependencies (optional - not needed for WASM)
zstd = { version = "0.13", optional = true }
tar = { version = "0.4", optional = true }
flate2 = { version = "1.1", optional = true }
base64 = { version = "0.22", optional = true }

# Playground dependencies (removed from v1.0 - will be moved to separate rash-playground crate)
# ratatui = { version = "0.29", default-features = false, features = ["crossterm"], optional = true }
# ropey = { version = "1.6", optional = true }
# tree-sitter = { version = "0.25", optional = true }
# tree-sitter-rust = { version = "0.23", optional = true }
# syntect = { version = "5.1", default-features = false, features = ["parsing"], optional = true }
# crossbeam = { version = "0.8", optional = true }
# dashmap = { version = "6.1", optional = true }
# petgraph = { version = "0.8", optional = true }
# rayon = { version = "1.10", optional = true }
# brotli = { version = "8.0", optional = true }
# simdutf8 = { version = "0.1", optional = true }
# bit-vec = { version = "0.8", optional = true }
# lru = { version = "0.14", optional = true }

# Optional dependencies for feature gates (commented out for now)
# z3 = { version = "0.12", optional = true }
# mutagen = { version = "0.2", optional = true }
# libfuzzer-sys = { version = "0.4", optional = true }

# WASM support (Phase 0: Feasibility Study)
wasm-bindgen = { version = "0.2", optional = true }
wasm-bindgen-futures = { version = "0.4", optional = true }
js-sys = { version = "0.3", optional = true }
web-sys = { version = "0.3", features = ["console"], optional = true }
console_error_panic_hook = { version = "0.1", optional = true }
getrandom = { version = "0.3", features = ["wasm_js"], optional = true }

[features]
# Default includes core features for full functionality
default = ["validation", "pretty-errors", "basic", "compile", "clap", "tokio", "tracing-subscriber"]
# Minimal build for smallest binary size (<3MB)
minimal = []
# Full build with all features (~6MB)
full = ["pattern-matching", "loops", "verification", "optimization", "lsp", "completions", "watch", "compile", "clap", "tokio", "tracing-subscriber"]
# Individual features
basic = []
compile = ["tokio", "zstd", "tar", "flate2", "base64"]  # Binary compilation and self-extracting scripts
pattern-matching = []
loops = []
verification = []  # ["z3"] when available
optimization = []
validation = []
pretty-errors = []
lsp = []
completions = []
watch = []
# oracle = ["bashrs-oracle"]  # ML-powered error classification and fix suggestions (publish separately)
wasm = ["wasm-bindgen", "wasm-bindgen-futures", "js-sys", "web-sys", "console_error_panic_hook", "getrandom"]  # Phase 0: WASM feasibility study
# playground = ["ratatui", "ropey", "tree-sitter", "tree-sitter-rust", "crossbeam", "dashmap", "petgraph", "rayon", "brotli", "simdutf8", "bit-vec", "lru"]  # Removed from v1.0 - move to separate crate
# mutation-testing = ["mutagen"] when available
# fuzzing = ["libfuzzer-sys"] when available

[dev-dependencies]
tempfile.workspace = true
criterion.workspace = true
proptest.workspace = true
rstest.workspace = true
assert_cmd = "2.0"
predicates = "3.1"
renacer = "0.6"  # Golden trace integration - syscall tracing for regression detection
verificar = { path = "../../verificar" }  # Synthetic bash program generation for comprehensive testing

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

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

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

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

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

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

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

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

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

# Note: The actual Rash examples are in the examples/ directory
# They are written in Rash syntax and must be transpiled, not compiled
# See examples/README.md for usage instructions

[package.metadata.wasm-pack.profile.release]
wasm-opt = false

