# 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.91.1"
name = "grafeo-storage"
version = "0.5.36"
authors = ["S.T. Grond"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Persistence layer for Grafeo: WAL, container format, section I/O"
readme = false
license = "Apache-2.0"
repository = "https://github.com/GrafeoDB/grafeo"
resolver = "2"

[features]
async-storage = ["wal"]
default = ["wal"]
grafeo-file = [
    "wal",
    "fs2",
]
testing-crash-injection = ["grafeo-common/testing-crash-injection"]
tracing = [
    "dep:tracing",
    "grafeo-common/tracing",
]
wal = [
    "memmap2",
    "tokio",
    "crossbeam",
]

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

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

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

[dependencies.bincode]
version = "2.0"
features = ["serde"]

[dependencies.byteorder]
version = "1"

[dependencies.bytes]
version = "1"

[dependencies.crc32fast]
version = "1"

[dependencies.crossbeam]
version = "0.8"
optional = true

[dependencies.fs2]
version = "0.4"
optional = true

[dependencies.grafeo-common]
version = "0.5.36"

[dependencies.memmap2]
version = "0.9"
optional = true

[dependencies.parking_lot]
version = "0.12"

[dependencies.serde]
version = "1.0"
features = [
    "derive",
    "rc",
]

[dependencies.thiserror]
version = "2.0"

[dependencies.tokio]
version = "1"
features = [
    "rt-multi-thread",
    "fs",
    "io-util",
    "sync",
    "time",
    "macros",
]
optional = true

[dependencies.tracing]
version = "0.1"
optional = true

[dev-dependencies.serde_json]
version = "1"

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

[lints.clippy]
cast_lossless = "allow"
cast_possible_truncation = "allow"
cast_possible_wrap = "allow"
cast_precision_loss = "allow"
cast_sign_loss = "allow"
default_trait_access = "allow"
derivable_impls = "allow"
doc_link_with_quotes = "allow"
doc_markdown = "allow"
float_cmp = "allow"
if_not_else = "allow"
implicit_hasher = "allow"
items_after_statements = "allow"
large_enum_variant = "allow"
manual_div_ceil = "allow"
manual_slice_size_calculation = "allow"
map_entry = "allow"
match_same_arms = "allow"
match_wildcard_for_single_variants = "allow"
missing_errors_doc = "warn"
missing_fields_in_debug = "allow"
missing_panics_doc = "warn"
module_name_repetitions = "allow"
must_use_candidate = "allow"
mut_from_ref = "allow"
needless_continue = "allow"
needless_pass_by_value = "allow"
needless_range_loop = "allow"
needless_raw_string_hashes = "allow"
ptr_as_ptr = "allow"
redundant_closure_for_method_calls = "allow"
ref_option = "allow"
return_self_not_must_use = "allow"
should_implement_trait = "allow"
similar_names = "allow"
single_match = "allow"
single_match_else = "allow"
struct_field_names = "allow"
too_many_lines = "allow"
type_complexity = "allow"
uninlined_format_args = "allow"
unnecessary_literal_bound = "allow"
unnecessary_map_or = "allow"
unnecessary_wraps = "allow"
unnested_or_patterns = "allow"
unreadable_literal = "allow"
unused_self = "allow"
used_underscore_binding = "allow"
while_let_loop = "allow"
wildcard_imports = "warn"

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

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

[lints.rust]
missing_docs = "warn"
unsafe_code = "warn"
