# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.95.0"
name = "bitcoin-rs-storage"
version = "0.3.0"
authors = ["bitcoin-rs contributors"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "bitcoin-rs :: storage"
readme = "README.md"
license = "MIT OR Apache-2.0"
repository = "https://github.com/bitcoin-rs/bitcoin-rs"

[features]
default = ["fjall"]
fjall = ["dep:fjall"]
mdbx = ["dep:signet-libmdbx"]
redb = ["dep:redb"]
rocksdb = ["dep:rust-rocksdb"]

[lib]
name = "bitcoin_rs_storage"
path = "src/lib.rs"

[[test]]
name = "backend_equivalence"
path = "tests/backend_equivalence.rs"

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

[dependencies.bytemuck]
version = ">=1.25, <2"
features = ["derive"]
default-features = false

[dependencies.bytes]
version = ">=1.11, <2"
default-features = false

[dependencies.crossbeam-channel]
version = ">=0.5.15, <0.6"
features = ["std"]
default-features = false

[dependencies.fjall]
version = ">=3.1.4, <4"
features = ["lz4"]
optional = true
default-features = false

[dependencies.parking_lot]
version = ">=0.12.5, <0.13"
features = [
    "arc_lock",
    "send_guard",
]
default-features = false

[dependencies.redb]
version = ">=4.1, <5"
optional = true
default-features = false

[dependencies.rust-rocksdb]
version = ">=0.50, <0.51"
features = [
    "mt_static",
    "snappy",
    "lz4",
    "zstd",
]
optional = true
default-features = false

[dependencies.serde]
version = ">=1, <2"
features = [
    "derive",
    "std",
    "alloc",
]
default-features = false

[dependencies.signet-libmdbx]
version = ">=0.8.3, <0.9"
optional = true
default-features = false

[dependencies.thiserror]
version = ">=2, <3"
features = ["std"]
default-features = false

[dependencies.tracing]
version = ">=0.1.44, <0.2"
features = [
    "std",
    "attributes",
]
default-features = false

[dev-dependencies.criterion]
version = ">=0.8.2, <0.9"
features = [
    "cargo_bench_support",
    "html_reports",
    "plotters",
    "rayon",
]
default-features = false

[dev-dependencies.rayon]
version = ">=1.12, <2"

[dev-dependencies.sha2]
version = ">=0.11, <0.12"
default-features = false

[dev-dependencies.tempfile]
version = "3"

[lints.clippy]
as_conversions = "deny"
cast_lossless = "deny"
collapsible_if = "allow"
dbg_macro = "deny"
expect_used = "warn"
format_push_string = "allow"
into_iter_without_iter = "allow"
iter_without_into_iter = "allow"
manual_let_else = "allow"
missing_const_for_fn = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
mod_module_files = "deny"
module_name_repetitions = "allow"
must_use_candidate = "allow"
needless_continue = "allow"
option_if_let_else = "allow"
redundant_pub_crate = "allow"
significant_drop_tightening = "allow"
similar_names = "allow"
struct_field_names = "allow"
todo = "deny"
undocumented_unsafe_blocks = "deny"
unimplemented = "deny"
unwrap_used = "deny"

[lints.clippy.nursery]
level = "warn"
priority = -1

[lints.clippy.pedantic]
level = "warn"
priority = -1

[lints.rust]
missing_docs = "warn"
unreachable_pub = "warn"
unsafe_op_in_unsafe_fn = "deny"
