[package]
name = "batpak"
version = "0.1.0"
edition = "2021"
rust-version = "1.75"
license = "MIT OR Apache-2.0"
description = "Event sourcing with causal graphs and policy gates. Sync API, zero async."
repository = "https://github.com/TheFreeBatteryFactory/batpak"
homepage = "https://github.com/TheFreeBatteryFactory/batpak"
documentation = "https://docs.rs/batpak"
readme = "README.md"
keywords = ["event-sourcing", "audit-trail", "causal-graph", "hash-chain", "policy-engine"]
categories = ["database", "concurrency"]

[features]
default = ["blake3"]
blake3 = ["dep:blake3"]
redb = ["dep:redb"]
lmdb = ["dep:heed"]

[dependencies]
uuid = { version = "1", features = ["v7"] }
serde = { version = "1", features = ["derive", "rc"] }
serde_json = "1"
blake3 = { version = "1", optional = true }
flume = "0.11"
crc32fast = "1"
rmp-serde = "1"
dashmap = "5"
parking_lot = "0.12"
tracing = "0.1"
redb = { version = "2", optional = true }
heed = { version = "0.20", optional = true }
# NO TOKIO. Invariant 1.

[dev-dependencies]
proptest = "1"
arbitrary = { version = "1", features = ["derive"] }
criterion = { version = "0.5", features = ["html_reports"] }
tempfile = "3"
trybuild = "1"
tokio = { version = "1", features = ["rt", "macros"] }
rand = "0.8"

[lints.clippy]
dbg_macro = "deny"
todo = "deny"
unimplemented = "deny"
unwrap_used = "deny"
panic = "deny"
print_stdout = "deny"
print_stderr = "deny"
cast_possible_truncation = "deny"
cast_sign_loss = "deny"
wildcard_enum_match_arm = "warn"
assertions_on_constants = "deny"
disallowed_methods = "deny"
large_enum_variant = "warn"
clone_on_ref_ptr = "warn"
needless_pass_by_value = "warn"
module_name_repetitions = "allow"
must_use_candidate = "allow"
missing_errors_doc = "allow"

[lints.rust]
deprecated = "deny"

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

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

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

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

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

# Profile settings (NOT in .cargo/config.toml — they're ignored there)
[profile.dev]
opt-level = 0
debug = true
incremental = true

[profile.dev.package."*"]
opt-level = 2

[profile.release]
opt-level = 3
lto = "thin"
codegen-units = 16
strip = "symbols"

[profile.test]
opt-level = 1

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