[package]
name = "normfs"
version.workspace = true
edition = "2021"
authors.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
description = "High-performance persistent queue storage with tiered memory/disk/cloud lifecycle management"
readme = "../README.md"

[features]
default = []
websocket = ["fastwebsockets", "hyper", "hyper-util", "http-body-util"]
server-bin = ["clap", "env_logger"]

[dependencies]
uintn = { version = "0.1.0-beta.0", path = "../uintn-rs" }
normfs-types = { version = "0.1.0-beta.0", path = "../normfs-types" }
normfs-wal = { version = "0.1.0-beta.0", path = "../normfs-wal" }
normfs-store = { version = "0.1.0-beta.0", path = "../normfs-store" }
normfs-cloud = { version = "0.1.0-beta.0", path = "../normfs-cloud" }
normfs-crypto = { version = "0.1.0-beta.0", path = "../normfs-crypto" }
tokio = { workspace = true }
bytes = { workspace = true }
prost = { workspace = true }
log = { workspace = true }
libc = "0.2"
url = "2.5"
globset = "0.4"

# Optional dependencies for binary
clap = { version = "4", features = ["derive", "env"], optional = true }
env_logger = { workspace = true, optional = true }

# Optional websocket dependencies
fastwebsockets = { version = "0.10.0", optional = true, features = ["upgrade"] }
hyper = { version = "1.7.0", optional = true, features = ["http1", "server"] }
hyper-util = { version = "0.1.6", optional = true, features = ["full"] }
http-body-util = { version = "0.1", optional = true }

[dev-dependencies]
tempfile = { workspace = true }
env_logger = { workspace = true }
criterion = { workspace = true, features = ["async_tokio"] }
fastrand = "2.0"

[build-dependencies]
prost-build = "0.12"

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

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

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

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

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

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

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

[[bin]]
name = "normfs-server"
path = "src/bin/normfs-server.rs"
required-features = ["server-bin"]