# 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.89"
name = "shodh-redb"
version = "0.3.0"
authors = ["Varun Sharma"]
build = "build.rs"
exclude = [
    "fuzz/",
    "crates/bf-tree/",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Multi-modal embedded database - vectors, blobs, TTL, merge operators, and causal tracking built on ACID B-trees"
homepage = "https://github.com/varun29ankuS/shodh-redb"
readme = "README.md"
keywords = [
    "database",
    "embedded",
    "vector",
    "blob",
    "no_std",
]
categories = [
    "database-implementations",
    "data-structures",
    "no-std",
]
license = "Apache-2.0"
repository = "https://github.com/varun29ankuS/shodh-redb"

[features]
bf_tree = [
    "std",
    "dep:rand_08",
    "dep:portable-atomic",
    "dep:cfg-if",
    "dep:serde",
    "dep:serde_json",
    "dep:thread_local",
    "dep:toml",
    "dep:io-uring",
    "dep:libc",
    "dep:windows-sys",
]
cache_metrics = []
compression = [
    "compression_lz4",
    "compression_zstd",
]
compression_lz4 = ["dep:lz4_flex"]
compression_zstd = ["dep:zstd"]
default = ["std"]
logging = ["dep:log"]
std = []

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

[[example]]
name = "bincode_keys"
path = "examples/bincode_keys.rs"

[[example]]
name = "derive_value_impl"
path = "examples/derive_value_impl.rs"

[[example]]
name = "int_keys"
path = "examples/int_keys.rs"

[[example]]
name = "multithread"
path = "examples/multithread.rs"

[[example]]
name = "special_values"
path = "examples/special_values.rs"

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[dependencies.cfg-if]
version = "1"
optional = true

[dependencies.chrono_v0_4]
version = "0.4.41"
optional = true
package = "chrono"

[dependencies.hashbrown]
version = "0.15"

[dependencies.log]
version = "0.4.17"
optional = true

[dependencies.lz4_flex]
version = "0.11.5"
optional = true

[dependencies.portable-atomic]
version = "1"
features = ["fallback"]
optional = true
default-features = false

[dependencies.rand_08]
version = "0.8.5"
features = [
    "small_rng",
    "std",
    "std_rng",
]
optional = true
default-features = false
package = "rand"

[dependencies.serde]
version = "1"
features = [
    "derive",
    "alloc",
    "std",
]
optional = true
default-features = false

[dependencies.serde_json]
version = "1.0.116"
optional = true

[dependencies.sha2]
version = "0.10"
default-features = false

[dependencies.spin]
version = "0.9"
features = [
    "mutex",
    "spin_mutex",
    "rwlock",
]
default-features = false

[dependencies.thread_local]
version = "1.1.9"
optional = true

[dependencies.toml]
version = "0.8.23"
optional = true

[dependencies.uuid]
version = "1.17.0"
optional = true

[dependencies.zstd]
version = "0.13.3"
optional = true
default-features = false

[dev-dependencies.bincode]
version = "2.0.1"

[dev-dependencies.bytemuck]
version = "1.24.0"
features = ["must_cast"]

[dev-dependencies.proptest]
version = "1.6.0"
features = ["std"]
default-features = false

[dev-dependencies.proptest-derive]
version = "0.5.1"

[dev-dependencies.rand]
version = "0.10.0"

[dev-dependencies.rand_test]
version = "0.9.2"
package = "rand"

[dev-dependencies.redb2_6]
version = "=2.6.0"
package = "redb"

[dev-dependencies.rstest]
version = "0.19.0"

[dev-dependencies.shodh-redb-derive]
version = "0.1.0"

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

[dev-dependencies.uuid]
version = "1.17.0"
features = ["v4"]

[target.'cfg(target_os = "linux")'.dependencies.io-uring]
version = "0.6.4"
optional = true

[target.'cfg(target_os = "wasi")'.dependencies.libc]
version = "0.2.174"

[target.'cfg(target_os = "windows")'.dependencies.windows-sys]
version = "0.59.0"
features = [
    "Win32_System_Threading",
    "Win32_System_WindowsProgramming",
]
optional = true

[target."cfg(unix)".dependencies.libc]
version = "0.2.174"
optional = true

[lints.clippy]
big_endian_bytes = "deny"
dbg_macro = "deny"
host_endian_bytes = "deny"

[lints.rust.unexpected_cfgs]
level = "allow"
priority = 0
check-cfg = ['cfg(feature, values("metrics", "metrics-rt", "metrics-rt-debug-all", "metrics-rt-debug-timer", "shuttle", "tracing"))']

[profile.bench]
debug = 2
