[package]
exclude = ["tests/", "benches/", "docs/", ".github/", "book/", ".pmat/", "target/", ".profraw", ".profdata", ".vscode/", ".idea/", "proptest-regressions/"]
name = "aprender-registry"
version.workspace = true
edition = "2021"
authors = ["Pragmatic AI Labs <info@paiml.com>"]
license = "MIT"
description = "Model, Data and Recipe Registry with full lineage tracking"
repository = "https://github.com/paiml/pacha"
keywords = ["ml", "registry", "mlops", "lineage", "reproducibility"]
categories = ["science", "database"]
rust-version = "1.75"
readme = "README.md"

[dependencies]
# Error handling
thiserror = "2"
anyhow = "1"

# Content-addressed storage
blake3 = "1"

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

# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "0.8"
rmp-serde = "1"

# Time
chrono = { version = "0.4", features = ["serde"] }

# UUID for identifiers
uuid = { version = "1", features = ["v4", "serde"] }

# Compression
zstd = { version = "0.13", optional = true }

# CLI (optional)
clap = { version = "4", features = ["derive"], optional = true }

# Ecosystem integration
aprender = { path = "../aprender-core", version = "0.31.2", package = "aprender-core", optional = true }
alimentar = { version = "0.2.3", optional = true }

# HTTP client (optional)
reqwest = { version = "0.12", features = ["json", "rustls-tls"], default-features = false, optional = true }
tokio = { version = "1", features = ["rt-multi-thread", "macros"], optional = true }

# Encryption (optional)
chacha20poly1305 = { version = "0.10", optional = true }
argon2 = { version = "0.5", optional = true }

# Signing (proper Ed25519)
ed25519-dalek = { version = "2.1", features = ["rand_core"], optional = true }
rand = { version = "0.8", optional = true }

# Graph for lineage (optional)
trueno-graph = { version = "0.1.17", optional = true }

[dev-dependencies]
proptest = "1.6"
tempfile = "3"
criterion = { version = "0.6", features = ["html_reports"] }

[features]
default = ["compression", "cli", "signing"]
compression = ["zstd"]
cli = ["clap"]
remote = ["reqwest", "tokio"]
encryption = ["chacha20poly1305", "argon2", "rand"]
signing = ["ed25519-dalek", "rand"]
lineage-graph = ["trueno-graph"]
aprender-integration = ["aprender"]
alimentar-integration = ["alimentar"]
full = ["compression", "cli", "remote", "encryption", "signing", "lineage-graph", "aprender-integration", "alimentar-integration"]

[lib]
name = "pacha"
path = "src/lib.rs"

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

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

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

[lints.rust]
unsafe_code = "allow"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--generate-link-to-definition"]

[package.metadata.release]
shared-version = true

[[package.metadata.release.pre-release-replacements]]
file = "CHANGELOG.md"
search = "## \\[Unreleased\\]"
replace = "## [{{version}}] - {{date}}"

[profile.dev]
panic = "abort"
