[package]
name = "skl"
version = "0.20.0"
edition = "2021"
rust-version = "1.81.0"
repository = "https://github.com/al8n/skl"
description = "A lock-free thread-safe concurrent ARENA based (heap backend or memory map backend) skiplist implementation which helps develop MVCC memtable for LSM-Tree."
documentation = "https://docs.rs/skl"
homepage = "https://github.com/al8n/skl"
keywords = ["skiplist", "lock-free", "memtable", "crossbeam-skiplist", "arena"]
categories = ["database", "data-structures", "concurrency", "no-std"]
license = "MIT OR Apache-2.0"

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

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

[[example]]
name = "mmap"
path = "examples/mmap.rs"
required-features = ["memmap"]

[[example]]
name = "mmap-anon"
path = "examples/mmap_anon.rs"
required-features = ["memmap"]

[[example]]
name = "multiple_maps"
path = "examples/multiple_maps.rs"
required-features = ["memmap"]

[features]
default = ["std"]
alloc = ["rarena-allocator/alloc", "dbutils/alloc"]
memmap = ["rarena-allocator/memmap", "std"]
std = ["rand/default", "either/default", "dbutils/default", "rarena-allocator/std", "memchr?/default", "among/default"]
tracing = ["dep:tracing", "rarena-allocator/tracing"]

experimental = ["memchr"]

[target.'cfg(target_family = "wasm")'.dependencies]
getrandom = { version = "0.2", features = ["js"] }

[dependencies]
among = { version = "0.1", default-features = false, features = ["either"] }
arbitrary-int = { version = "1.2", default-features = false }
bitflags = "2"
dbutils = { version = "0.10", default-features = false }
either = { version = "1", default-features = false }
memchr = { version = "2", default-features = false, optional = true }
rand = { version = "0.8", default-features = false, features = ["getrandom"] }
# rarena-allocator = { version = "0.4", default-features = false, path = "../arena/rarena-allocator" }
rarena-allocator = { version = "0.4", default-features = false }
viewit = "0.1.5"
paste = "1"

tracing = { version = "0.1", optional = true }

[dev-dependencies]
criterion = "0.5"
tempfile = "3"
parking_lot = "0.12"


[profile.bench]
opt-level = 3
debug = false
codegen-units = 1
lto = 'thin'
incremental = false
debug-assertions = false
overflow-checks = false
rpath = false

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[workspace]
members = ["integration"]

[lints.rust]
rust_2018_idioms = "warn"
single_use_lifetimes = "warn"
unexpected_cfgs = { level = "warn", check-cfg = [
  'cfg(all_skl_tests)',
  'cfg(test_generic_unsync_versioned)',
  'cfg(test_generic_unsync_map)',
  'cfg(test_generic_sync_versioned)',
  'cfg(test_generic_sync_map)',
  'cfg(test_generic_sync_multiple_version_concurrent)',
  'cfg(test_generic_sync_map_concurrent)',
  'cfg(test_generic_sync_multiple_version_concurrent_with_optimistic_freelist)',
  'cfg(test_generic_sync_map_concurrent_with_optimistic_freelist)',
  'cfg(test_generic_sync_multiple_version_concurrent_with_pessimistic_freelist)',
  'cfg(test_generic_sync_map_concurrent_with_pessimistic_freelist)', 
  'cfg(test_dynamic_unsync_versioned)',
  'cfg(test_dynamic_unsync_map)',
  'cfg(test_dynamic_sync_versioned)',
  'cfg(test_dynamic_sync_map)',
  'cfg(test_dynamic_sync_multiple_version_concurrent)',
  'cfg(test_dynamic_sync_map_concurrent)',
  'cfg(test_dynamic_sync_multiple_version_concurrent_with_optimistic_freelist)',
  'cfg(test_dynamic_sync_map_concurrent_with_optimistic_freelist)',
  'cfg(test_dynamic_sync_multiple_version_concurrent_with_pessimistic_freelist)',
  'cfg(test_dynamic_sync_map_concurrent_with_pessimistic_freelist)', 
] }
