[package]
name = "citadeldb-io"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
authors.workspace = true
repository.workspace = true
homepage.workspace = true
keywords.workspace = true
categories.workspace = true
description = "I/O layer for Citadel: PageIO trait, sync I/O, file locking, file management"
readme = "README.md"

[lib]
name = "citadel_io"

[features]
default = []
io-uring = ["dep:io-uring"]

[dependencies]
citadel-core = { workspace = true }
xxhash-rust = { workspace = true }
parking_lot = { workspace = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
memmap2 = { workspace = true }

[target.'cfg(unix)'.dependencies]
libc = { workspace = true }

[target.'cfg(target_os = "linux")'.dependencies]
io-uring = { workspace = true, optional = true }

[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.59", features = ["Win32_Foundation", "Win32_Storage_FileSystem", "Win32_System_IO"] }

[dev-dependencies]
tempfile = "3"
