[package]
name = "armour"
version = "0.32.0"
authors = ["Rail Khusnutdinov <rail@33.run>"]
description = "DDL and serialization for key-value storage"
keywords = ["key-value", "ORM", "DDL", "serialization", "databases"]
categories = []
license = "MIT OR Apache-2.0"
homepage = "https://github.com/libfunc/armour/"
repository = "https://github.com/libfunc/armour/"
documentation = "https://docs.rs/armour/"
readme = "../README.md"
edition = "2024"

[[example]]
name = "decimal"
test = false
bench = false
required-features = ["rust_decimal"]

[[example]]
name = "ids"
test = false
bench = false
# required-features = ["id32"]

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

[package.metadata.cargo-machete]
ignored = ["brsl2", "primitive-from-enum"]

[features]
default = ["std", "fjall", "rpc", "id_vec"]
std = [
    "armour-core/std",
    "time/std",
    "time/serde-human-readable",
    "arrayvec/serde",
    "dep:thiserror",
    "dep:bytes",
    "dep:rand",
    "dep:parking_lot",
    "dep:async-broadcast",
    "dep:strum",
]
id32 = []
fjall = ["dep:fjall", "rapira/fjall"]
rkyv = ["dep:rkyv", "rkyv/std", "rkyv/alloc", "rkyv/bytecheck", "armour-core/rkyv"]
bytemuck = ["dep:bytemuck"]
solana = ["solana-pubkey", "solana-signature", "armour-core/solana"]
smol_str = ["dep:smol_str", "armour-core/smol_str"]
compact_str = ["dep:compact_str", "armour-core/compact_str"]
rust_decimal = ["dep:rust_decimal", "armour-core/rust_decimal"]
value_indexes = []
id_vec = ["bytemuck"]
rpc = ["fjall", "dep:armour-rpc", "dep:compio", "dep:futures-util", "dep:async-broadcast", "dep:ctrlc"]
facet = ["dep:facet", "armour-core/facet"]
ts-rs = ["dep:ts-rs", "armour-core/ts-rs"]
fake = ["dep:fake", "armour-core/fake"]

[dependencies]
armour-core = { version = "0.3", features = ["std"] }
armour-rpc = { version = "0.2", optional = true }
armour-derive = "0.28"
rapira = "0.13"

arrayvec = { version = "0.7" }
data-encoding = "2.4"
data-encoding-macro = "0.1"
const-decoder = "0.4"
time = { version = "0.3", default-features = false }
# typ_hash stability: "0.8" pins major+minor (caret for 0.x), patch floats;
# exact patch is locked by Cargo.lock; output drift is caught by the golden
# test in armour-core::typ. Do not loosen without re-capturing the golden table.
xxhash-rust = { version = "0.8", features = ["xxh3"] }
crc32fast = "1.4"
const-fnv1a-hash = "1.1"
uuid = { version = "1.3", default-features = false }
facet = { version = "0.46", optional = true }

scc = "3.3"
rayon = "1.7"
crossbeam-skiplist = "0.1"
num_cpus = "1.15"
derive_more = { version = "2", features = ["debug", "from", "deref", "deref_mut", "as_ref"] }
tracing = "0.1"
metrics = "0.24"
serde = { version = "1.0" }
serde_json = { version = "1.0" }

fjall = { version = "3.0", optional = true }
# canopydb = { version = "0.2", optional = true }

compio = { version = "0.19", optional = true, features = ["runtime", "net", "io", "macros", "signal"] }
futures-util = { version = "0.3", optional = true }
ctrlc = { version = "3.4", optional = true }
rust_decimal = { version = "1.30", optional = true }
thiserror = { version = "2.0", optional = true }
compact_str = { version = "0.9", optional = true }
smol_str = { version = "0.3", optional = true }
bytes = { version = "1.5", optional = true }
rand = { version = "0.10", optional = true }
parking_lot = { version = "0.12", optional = true }
async-broadcast = { version = "0.7", optional = true }
strum = { version = "0.28", optional = true, features = ["derive"] }
rkyv = { version = "0.8", default-features = false, features = [], optional = true }
rend = { version = "0.5", features = ["zerocopy-0_8", "bytemuck-1"] }
zerocopy = { version = "0.8", features = ["derive"] }
bytemuck = { version = "1.23", optional = true, features = ["derive", "extern_crate_alloc"] }
bitcode = { version = "0.6", optional = true }

solana-pubkey = { version = "4.0", optional = true }
solana-signature = { version = "3.1", optional = true }

ts-rs = { version = "12.0", optional = true, features = ["no-serde-warnings"] }
fake = { version = "5.1", optional = true }

[dev-dependencies]
criterion = "0.8"
harsh = "0.2"
sqids = "0.4"
bs58 = "0.5"
