[package]
name = "tor-persist"
version = "0.27.0"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.77"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Persistent state for the Arti Tor implementation"
keywords = ["tor", "arti"]
categories = ["config"]
repository = "https://gitlab.torproject.org/tpo/core/arti.git/"

[features]
# Enable the state_dir module
state-dir = ["__is_experimental", "amplify", "fslock-guard"]
# Enable testing-only APIs.  APIs under this feature are not
# covered by semver.
testing = ["__is_experimental"]

full = [
    "fs-mistrust/full",
    "tor-error/full",
    "fslock-guard?/full",
    "tor-basic-utils/full",
    "tor-async-utils/full",
    "oneshot-fused-workaround/full",
]

experimental = ["state-dir", "testing"]
__is_experimental = []

[dependencies]
amplify = { version = "4", default-features = false, features = ["derive"], optional = true }
derive-deftly = "0.14"
derive_more = { version = "1.0.0", features = ["full"] }
filetime = { version = "0.2", default-features = false }
fs-mistrust = { path = "../fs-mistrust", version = "0.9.0", features = ["walkdir"] }
fslock-guard = { path = "../fslock-guard", version = "0.2.1", optional = true }
futures = "0.3.14"
itertools = "0.14.0"
oneshot-fused-workaround = { path = "../oneshot-fused-workaround", version = "0.2.0" }
paste = "1"
sanitize-filename = "0.6.0"
serde = { version = "1.0.103", features = ["derive"] }
serde_json = "1.0.50"
thiserror = "2"
time = { version = "0.3", features = ["std", "parsing", "macros", "formatting"] }
tor-async-utils = { path = "../tor-async-utils", version = "0.27.0" }
tor-basic-utils = { path = "../tor-basic-utils", version = "0.27.0" }
tor-error = { path = "../tor-error", version = "0.27.0", features = ["tracing"] }
tracing = "0.1.36"
void = "1"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
fslock = { version = "0.2.0" }

[dev-dependencies]
anyhow = { version = "1.0.23" }
derive-deftly = "0.14"
humantime = "2"
itertools = "0.14.0"
tempfile = "3"
test-temp-dir = { version = "0.3.0", path = "../test-temp-dir" }
tracing-test = "0.2.4"

[package.metadata.docs.rs]
all-features = true
