[package]
name = "ggen"
version = "5.0.0"
authors = ["Sean Chatman <sean@chatmangpt.com>"]
edition = "2021"
repository = "https://github.com/seanchatmangpt/ggen"
readme = "README.md"
license = "MIT"
keywords = ["code-generation", "rdf", "sparql", "ontology", "templates"]
homepage = "https://github.com/seanchatmangpt/ggen"
categories = ["development-tools", "command-line-utilities"]
description = "Ontology-driven code generation: Transform RDF ontologies into typed code through SPARQL queries and Tera templates"

[workspace]
members = [
  "crates/ggen-utils",
  "crates/ggen-cli",
  "crates/ggen-domain",
  "crates/ggen-core",
  "crates/ggen-ai",
  "crates/ggen-config",
  "crates/ggen-cli-validation",
  "crates/ggen-config-clap",
  "crates/ggen-marketplace",
  "crates/ggen-test-audit",    # Feature 004: Test quality audit tooling
  "crates/ggen-test-opt",      # Feature 004: Test optimization tooling
  "crates/ggen-e2e",           # Feature 011: End-to-end testing with testcontainers
  "crates/ggen-node", "crates/ggen-macros", "crates/ggen-dod",
  "playground",
]
exclude = [
  "examples/",
  "examples/marketplace-demo/generated",
  "marketplace/packages/workflow-engine-cli",
]
resolver = "2" # Use new resolver for better dependency resolution

# Workspace-wide dependencies for version consistency
[workspace.dependencies]
tokio = { version = "1.47", features = ["full"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
anyhow = "1.0"
thiserror = "2.0"
async-trait = "0.1"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = [
  "env-filter",
  "json",
  "ansi",
] }
clap = { version = "4.5", features = ["derive"] }
clap-noun-verb = { version = "5.3.4", default-features = false }
clap-noun-verb-macros = { version = "5.3.4" }
once_cell = "1.19"
reqwest = { version = "0.12", features = ["json", "rustls-tls"] }
tempfile = "3.23"
chrono = { version = "0.4", features = ["serde"] }
futures = "0.3"
futures-util = "0.3"
uuid = { version = "1.18", features = ["v4", "serde"] }
tera = "1.20"
oxigraph = "0.5.1"
toml = "0.9"
serde_yaml = "0.9"
regex = "1.12"
rayon = "1.11"
log = "0.4.28"
sha2 = "0.10"
hex = "0.4"

# E2E testing with testcontainers
testcontainers = "0.25"
testcontainers-modules = "0.13"
assert_cmd = "2.0"
predicates = "3.1"

# Workspace-local crates (use workspace = true pattern in workspace members)
ggen-utils = { path = "crates/ggen-utils", version = "5.0.0" }
ggen-core = { path = "crates/ggen-core", version = "5.0.0" }
ggen-ai = { path = "crates/ggen-ai", version = "5.0.0" }
ggen-config = { path = "crates/ggen-config", version = "5.0.0" }
ggen-cli-validation = { path = "crates/ggen-cli-validation", version = "5.0.0" }
ggen-config-clap = { path = "crates/ggen-config-clap", version = "5.0.0" }
ggen-marketplace = { path = "crates/ggen-marketplace", version = "5.0.0" }
ggen-domain = { path = "crates/ggen-domain", version = "5.0.0" }
ggen-cli-lib = { path = "crates/ggen-cli", version = "5.0.0" }
ggen-node = { path = "crates/ggen-node", version = "5.0.0" }
ggen-macros = { path = "crates/ggen-macros", version = "5.0.0" }
ggen-dod = { path = "crates/ggen-dod", version = "5.0.0" }
ggen-test-audit = { path = "crates/ggen-test-audit", version = "5.0.0" }  # Feature 004
ggen-test-opt = { path = "crates/ggen-test-opt", version = "5.0.0" }      # Feature 004

# OpenTelemetry dependencies
opentelemetry = "0.21"
opentelemetry-otlp = "0.14"
opentelemetry_sdk = { version = "0.21", features = ["rt-tokio"] }
tracing-opentelemetry = "0.22"

# CLI Enhancement libraries
indicatif = "0.18"
console = "0.16"

# Testing libraries
proptest = "1.8"
chicago-tdd-tools = "1.4.0"

# Force base64 version to resolve duplicate dependency issue
# config -> ron -> base64 0.21.7 conflicts with reqwest -> base64 0.22.1
base64 = "0.22"

# Patch removed - was causing conflicts with same source

# Maximized linting configuration (Rust 1.78+)
# **Poka-Yoke Design**: Warnings are treated as errors to prevent defects at compile time.
# Type-first thinking: Compiler enforces correctness. If it compiles, invariants are enforced.
# Prevention is better than detection - catch issues at compile time, not runtime.
# Note: Individual lint configuration is done via attributes in code
# This section sets global lint levels
[workspace.lints.rust]
warnings = "deny"  # Poka-Yoke: Prevent warnings at compile time
unsafe_code = "deny"
missing_docs = "warn"  # Documentation warnings are less critical than code quality

[workspace.lints.clippy]
# **Poka-Yoke Design**: Deny warnings to prevent defects at compile time.
# Type-first thinking: Use compiler as design tool to enforce correctness.
# Prevention is better than detection - catch issues at compile time, not runtime.
# Set lint groups to deny level for poka-yoke error prevention
all = { level = "deny", priority = -1 }
pedantic = { level = "deny", priority = -1 }
nursery = { level = "deny", priority = -1 }
cargo = { level = "deny", priority = -1 }

# Deny critical lints for Poka-Yoke (error prevention)
# These have higher priority (0) and will override the groups
unwrap_used = "deny"
expect_used = "deny"
panic = "deny"
todo = "deny"
unimplemented = "deny"

# Allow multiple crate versions due to complex dependency tree
multiple_crate_versions = "allow"

[features]
default = []
# Stable v3.x features
nightly = ["ggen-utils/nightly"]
termlog = ["ggen-utils/termlog"]
journald = ["ggen-utils/journald"]
syslog = ["ggen-utils/syslog"]
london_tdd = []
# EXPERIMENTAL: Marketplace v2 (planned for v4.0.0)
# To enable: cargo build --features marketplace-v2
marketplace-v2 = []

[dependencies]
ggen-utils = { path = "crates/ggen-utils", version = "5.0.0" }
ggen-cli-lib = { path = "crates/ggen-cli", version = "5.0.0" }
ggen-core = { path = "crates/ggen-core", version = "5.0.0" }
ggen-ai = { path = "crates/ggen-ai", version = "5.0.0" }
human-panic = "2.0.3"
better-panic = "0.3.0"
log = "0.4.28"
env_logger = "0.11"
tokio = { version = "1.47", features = ["full"] }
anyhow = "1.0"
chrono = { version = "0.4", features = ["serde"] }
serde_json = "1.0"
serde_yaml = "0.9"
clap = { version = "4.5", features = ["derive"] }
tempfile = "3.23"
tera = "1.20"
async-trait = "0.1"
serde = { version = "1.0", features = ["derive"] }
uuid = { version = "1.18", features = ["v4"] }
genai = "0.4"
tracing-subscriber = "0.3"

# Example definitions removed - examples now discovered automatically by Cargo

[dev-dependencies]
assert_cmd = "2.0.17"
predicates = "3.1.3"
serde_json = "1.0"
tempfile = "3.23"
anyhow = "1.0"
chrono = { version = "0.4", features = ["serde"] }
ggen-domain = { path = "crates/ggen-domain" }
oxigraph = "0.5.1"
# BDD testing framework
cucumber = { version = "0.21", features = ["macros"] }
assert_fs = "1.1"
mockito = "1.7"
insta = "1.43"
serial_test = "3.2"
md5 = "0.8"
shell-words = "1.1"
# E2E test dependencies
toml = "0.9"
reqwest = { version = "0.12", features = ["blocking", "json"] }
genai = "0.4"
proptest.workspace = true
# chicago-tdd-tools = { workspace = true, features = ["testcontainers"] }
# Note: chicago-tdd-tools commented for cross-platform compatibility
# Cleanroom integration for CLI testing
clnrm = "0.1.0"
testcontainers = "0.25"
testcontainers-modules = "0.13"
rand = "0.8"
mockall = "0.13"
fake = "2.9"
opentelemetry.workspace = true
opentelemetry-otlp.workspace = true
opentelemetry_sdk.workspace = true
futures.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true
tracing-opentelemetry.workspace = true
chicago-tdd-tools = { version = "1.4.0", features = ["testing-extras", "testcontainers"] }
# Performance benchmarking
criterion = { version = "0.7", features = ["html_reports"] }
once_cell = "1.20"
lazy_static = "1.4"
fastrand = "2.3"

# Process Mining for workflow analytics
process_mining = "0.2"

[profile.dev]
opt-level = 0
debug = true
rpath = false
lto = false
debug-assertions = true
codegen-units = 256          # More parallel compilation units = faster builds
incremental = true           # Enable incremental compilation
split-debuginfo = "unpacked" # Faster debug builds on macOS

[profile.release]
opt-level = 3
debug = false
rpath = false
lto = "thin"             # Thin LTO for faster builds, still optimized
debug-assertions = false
codegen-units = 16       # Balance between speed and optimization
strip = true             # Strip symbols for smaller binaries

[profile.test]
opt-level = 0           # Faster test compilation
debug = true
rpath = false
lto = false
debug-assertions = true
codegen-units = 256     # More parallel compilation
incremental = true      # Enable incremental for tests

[profile.bench]
opt-level = 3
debug = false
rpath = false
lto = true
debug-assertions = false
codegen-units = 1

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

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

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

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

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

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

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

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

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

# NOTE: Integration tests archived to .archive/ - only essential sync/codegen tests remain in crate src/
