[package]
name = "mirage-analyzer"
version = "1.0.4"
edition = "2021"
rust-version = "1.70"
authors = ["Mirage Contributors"]
description = "Path-Aware Code Intelligence Engine for Rust"
repository = "https://github.com/oldnordic/mirage"
documentation = "https://docs.rs/mirage-analyzer"
readme = "README.md"
license = "GPL-3.0-or-later"
keywords = ["code-analysis", "cfg", "path-enumeration", "mir", "control-flow"]
categories = ["development-tools", "development-tools::testing", "command-line-utilities"]

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

[dependencies]
# CLI
clap = { version = "4.5", features = ["derive", "env"] }

# Database
rusqlite = { version = "0.31", features = ["bundled"] }

# Magellan for inter-procedural analysis (required for CFG data)
magellan = { version = "2.4", path = "/home/feanor/Projects/magellan", default-features = false, features = ["sqlite-backend"] }



# sqlitegraph for GraphBackend trait
sqlitegraph = { version = "2.0", path = "/home/feanor/Projects/sqlitegraph/sqlitegraph-core", default-features = false, features = ["sqlite-backend"] }

# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

# Graph data structures
petgraph = "0.8"

# AST parsing (for non-Rust code fallback)
tree-sitter = "0.22"

# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

# Error handling
anyhow = "1.0"
thiserror = "1.0"

# Utils
blake3 = "1.5"
sha2 = "0.10"
is-terminal = "0.4"
chrono = "0.4"
git2 = "0.18"

[dev-dependencies]
tempfile = "3.10"

[features]
# Platform feature model - explicit opt-in required
default = ["unix", "backend-sqlite"]
unix = []
windows = []

# Backend selection - SQLite by default, Native-V3 available with feature flag
backend-sqlite = ["sqlitegraph/sqlite-backend"]
# Alias for backward compatibility
sqlite = ["backend-sqlite"]
# Native V3 backend - high performance binary format with B+Tree
backend-native-v3 = ["magellan/native-v3", "sqlitegraph/native-v3"]
native-v3 = ["backend-native-v3"]

# MIR extraction features will be added in Milestone 1

[profile.release]
opt-level = 3
lto = true
codegen-units = 1
strip = true
