[package]
name = "dynamic-cli"
version = "0.4.0"
edition = "2021"
authors = ["Dynamic CLI Contributors"]
license = "MIT OR Apache-2.0"
description = "A framework for building configurable CLI and REPL applications from YAML/JSON configuration files"
readme = "README.md"
repository = "https://github.com/biface/dcli"
documentation = "https://docs.rs/dynamic-cli"
homepage = "https://github.com/biface/dcli"
keywords = ["cli", "repl", "command", "yaml", "configuration"]
categories = ["command-line-interface", "command-line-utilities", "config"]
rust-version = "1.70"
exclude = [
    ".git*",
    "*.md",
    "examples/",
    "benches/",
    "tests/integration/",
]

[features]
wasm-plugins = ["dep:wasmtime"]

[dependencies]
# Serialization and configuration parsing
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9"

# Error management
thiserror = "2.0"
anyhow = "1.0"

# Terminal coloring and formatting
colored = { version = "3.0"}

# REPL interface (Session 7 - NOW ACTIVE)
rustyline = "14.0"

# System utilities
dirs = "5.0"

# WASM plugin runtime (optional — enabled via features = ["wasm-plugins"])
wasmtime = { version = "45.0.0", optional = true }

[dev-dependencies]
# Testing utilities
tempfile = "3.13"
#criterion = { version = "0.8", features = ["html_reports"] }

# CLI testing (for future use when binary is created)
# assert_cmd = "2.1"
# predicates = "3.1"


# Future features (not yet implemented)
# async-execution = ["tokio"]

[lib]
name = "dynamic_cli"
path = "src/lib.rs"
doctest = true

# Integration tests under tests/integration/ — not auto-discovered by Cargo
# since they live in a subdirectory rather than directly under tests/.
[[test]]
name = "system_plugin_test"
path = "tests/integration/system_plugin_test.rs"

[[test]]
name = "wasm_plugin_test"
path = "tests/integration/wasm_plugin_test.rs"
required-features = ["wasm-plugins"]

# Benchmark configuration (uncomment when benchmarks are implemented)
# [[bench]]
# name = "parser_benchmarks"
# harness = false
# required-features = []

# Example configuration (uncomment when examples are implemented)
# [[example]]
# name = "simple_calculator"
# path = "examples/simple_calculator.rs"
# required-features = []

# Configuration for documentation generation
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
targets = ["x86_64-unknown-linux-gnu"]

# Profile optimizations
[profile.dev]
opt-level = 0
debug = true
split-debuginfo = "unpacked"

[profile.release]
opt-level = 3
lto = true
codegen-units = 1
strip = true
debug = false
panic = "abort"

[profile.bench]
inherits = "release"
debug = true
