[package]
name = "mongreldb-core"
version.workspace = true
edition.workspace = true
license.workspace = true
rust-version.workspace = true
repository.workspace = true
description = "MongrelDB core: log-structured columnar store with sub-ms writes, learned indexes, and an AI-native access layer."

[dependencies]
thiserror = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
bincode = "1"
bytes = "1"
crc = "3"
sha2 = "0.10"
zstd = "0.13"
lz4_flex = "0.11"
parking_lot = "0.12"
arc-swap = "1"
roaring = "0.10"
memmap2 = "0.9"
bytemuck = "1"
rayon = "1.12"
zeroize = { version = "1", features = ["alloc"] }
getrandom = "0.2"

# Optional: native page-level encryption (AES-256-GCM) with the key hierarchy
# (Argon2id + HKDF KEK -> wrapped per-file DEK).
aes-gcm = { version = "0.10", optional = true }
argon2 = { version = "0.5", optional = true, default-features = false, features = ["alloc"] }
hkdf = { version = "0.12", optional = true }
hmac = { version = "0.12", optional = true }

[features]
default = []
# Enable page-level AES-256-GCM encryption and the key hierarchy.
encryption = ["dep:aes-gcm", "dep:argon2", "dep:hkdf", "dep:hmac"]

[dev-dependencies]
tempfile = "3"
criterion = "0.5"
bincode = "1"
sha2 = "0.10"

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

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

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

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

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

[[bench]]
name = "page_encryption"
harness = false
required-features = ["encryption"]
