[package]
name = "borromean"
version = "0.2.0"
edition = "2021"
license = "MIT"
description = "Efficient multi-collection storage for flash devices."
homepage = "https://github.com/moore/borromean"
repository = "https://github.com/moore/borromean"
readme = "README.md"
keywords = ["embedded", "no-std", "storage", "flash", "collections"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
default = []
std = ["serde/std"]
embedded-storage = ["dep:embedded-storage-traits"]
file-backing = ["std", "dep:libc", "dep:memmap2"]
perf-counters = ["std"]
perf-tools = [
    "file-backing",
    "perf-counters",
    "dep:fjall",
    "dep:redb",
    "dep:serde_json",
    "dep:toml",
]

[[bin]]
name = "file_backing_perf"
path = "src/bin/file_backing_perf.rs"
required-features = ["perf-tools"]

[[bench]]
name = "file_backing_mmap"
harness = false
required-features = ["file-backing"]

[dependencies]
crc = "3.2.1"
embedded-storage-traits = { package = "embedded-storage", version = "0.3.1", optional = true, default-features = false }
fjall = { version = "3.1", optional = true, default-features = false }
heapless = { version = "0.8.0", features = ["serde"] }
libc = { version = "0.2", optional = true }
memmap2 = { version = "0.9", optional = true }
postcard = { version = "1.0.8", features = ["use-crc"] }
redb = { version = "4.1", optional = true, default-features = false }
serde = { version = "1.0", default-features = false, features = ["derive"] }
serde_json = { version = "1.0", optional = true }
toml = { version = "0.8", optional = true }

[dev-dependencies]
criterion = { version = "0.8", features = ["html_reports"] }
proptest = "1.0.0"
