[package]
name = "nautilus-persistence"
readme = "README.md"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
authors.workspace = true
license.workspace = true
description = "Data persistence and storage for the Nautilus trading engine"
categories.workspace = true
keywords.workspace = true
documentation.workspace = true
repository.workspace = true
homepage.workspace = true
include = ["src/**/*", "bin/**/*", "Cargo.toml", "README.md"]

[lints]
workspace = true

[lib]
name = "nautilus_persistence"
crate-type = ["rlib", "staticlib", "cdylib"]

[features]
default = []
cloud = [
  "object_store/aws",
  "object_store/azure",
  "object_store/gcp",
  "object_store/http",
]
extension-module = [
  "nautilus-core/extension-module",
  "nautilus-model/extension-module",
  "nautilus-serialization/extension-module",
  "python",
  "pyo3/extension-module",
]
ffi = ["nautilus-core/ffi", "nautilus-model/ffi"]
python = [
  "nautilus-core/ffi",
  "nautilus-core/python",
  "nautilus-model/python",
  "nautilus-serialization/python",
  "pyo3",
  "cloud",
]
high-precision = [
  "nautilus-model/high-precision",
  "nautilus-serialization/high-precision",
]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
nautilus-common = { workspace = true, features = ["live"] }
nautilus-core = { workspace = true, features = ["ffi"] }
nautilus-model = { workspace = true, features = ["stubs"] }
nautilus-serialization = { workspace = true }

ahash = { workspace = true }
anyhow = { workspace = true }
arrow = { workspace = true }
binary-heap-plus = { workspace = true }
compare = { workspace = true }
datafusion = { workspace = true }
futures = { workspace = true }
heck = { workspace = true }
itertools = { workspace = true }
log = { workspace = true }
object_store = { workspace = true }
parquet = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
tokio = { workspace = true }
unbounded-interval-tree = { workspace = true }
url = { workspace = true }

pyo3 = { workspace = true, optional = true }

[dev-dependencies]
criterion = { workspace = true }
pretty_assertions = { workspace = true }
proptest = { workspace = true }
rand = { workspace = true }
rstest = { workspace = true }
tempfile = { workspace = true }

[[bench]]
name = "persistence"
path = "benches/persistence.rs"
harness = false

[[bin]]
name = "to_json"
path = "bin/to_json.rs"
required-features = ["python"]
doc = false

[[bin]]
name = "to_parquet"
path = "bin/to_parquet.rs"
required-features = ["python"]
doc = false
