[package]
name = "eryon-mem"

authors.workspace = true
categories.workspace = true
description.workspace = true
edition.workspace = true
homepage.workspace = true
keywords.workspace = true
license.workspace = true
readme.workspace = true
repository.workspace = true
version.workspace = true

[lib]
bench = true
crate-type = ["cdylib", "rlib"]
doctest = false
test = true

[features]
default = []

full = ["default", "json", "rand", "serde", "tracing"]

# ********* [FF] Dependencies *********
blockchain = []

json = [
    "dep:serde_json",
    "eryon-core/json",
    "serde"
]
rand = [
    "dep:rand", 
    "dep:rand_distr", 
    "num/rand", 
    "eryon-core/rand", 
    "rng", 
]

rng = [
    "eryon-core/rng", 
    "rand/small_rng", 
    "rand/thread_rng", 
]

serde = [
    "dep:serde", 
    "dep:serde_derive", 
    "num/serde", 
    "eryon-core/serde",
    "serde?/derive"
]

tracing = [
    "dep:tracing", 
    "eryon-core/tracing",
    "tracing?/attributes", 
    "tracing?/log"
]

[dependencies]
eryon-core = { features = ["std"], workspace = true }

anyhow = { workspace = true }
num = { workspace = true }
num-traits = { workspace = true }
paste = { workspace = true }
rand = { optional = true, workspace = true }
rand_distr = { optional = true, workspace = true }
serde = { optional = true, workspace = true }
serde_derive = { optional = true, workspace = true }
serde_json = { optional = true, workspace = true }
strum = { features = ["derive"], workspace = true }
thiserror = { workspace = true }
tracing = { optional = true, workspace = true }

# ********* tests *********
[[test]]
name = "default"
required-features = []

[[test]]
name = "memory"
required-features = ["full"]
