pathmap 0.2.2

A key-value store with prefix compression, structural sharing, and powerful algebraic operations
Documentation
[package]
name = "pathmap"
version = "0.2.2"
edition = "2024"
rust-version = "1.88"
license = "MIT"
description = "A key-value store with prefix compression, structural sharing, and powerful algebraic operations"
repository = "https://github.com/adam-Vandervorst/pathMap/"
keywords = ["trie", "MORK", "path", "algebra"]
categories = ["algorithms", "data-structures", "database-implementations"]
readme = "README.md"
exclude = ["target/", "benches/", "pathmap-book/", ".*"]

[package.metadata.docs.rs]
rustc-args = ["-C", "target-feature=+aes,+sse2"]

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

[dependencies]
pathmap-derive = { version = "0.2.1", path = "./pathmap-derive" }
maybe-dangling = "0.1.1"
dyn-clone = "1.0.17" # NOTE, we can eliminate this when we eliminate `!slim_ptrs`
local-or-heap = "0.1.0"
reusing-vec = {version = "0.2.0", features = ["smallvec"]}
smallvec = {version = "1.13.2", features = ["union"]}
arrayvec = "0.7.6"
num-traits = "0.2"
tikv-jemallocator = {version = "0.6.0", optional = true}
libz-ng-sys = {version = "1", optional = true } # for any serialzation
rand_distr = { version = "0.5.1", optional = true }
rand = { version = "0.9.0", optional = true }
memmap2 = { version="0.9.5", optional = true }
fast-slice-utils = "0.1.0"

[features]
default = ["graft_root_vals", "slim_ptrs", "serialization"]
nightly = ["fast-slice-utils/nightly"] # Uses features in the nightly tool chain for better performance, and the allocator and coroutine APIs
jemalloc = ["dep:tikv-jemallocator"] # Enables [jemalloc](https://jemalloc.net/) as the default allocator.  This dramatically improves scaling for write-heavy workloads and is generally recommended.  The only reason it is not the default is to avoid interference with the host application allocator.
zipper_tracking = [] #Exports the zipper_tracking module publicly
all_dense_nodes = [] # Exclusively use the DenseByteNode type, which generally performs worse but is useful for compatibility and perf comparisons.
arena_compact = ["dep:memmap2"]

bridge_nodes = [] # Enable the experimental BridgeNode type.  Incompatible with `all_dense_nodes` WILL BE REMOVED EVENTUALLY
old_cursor = [] # Enables an old deprecated traversal object that predates the zippers, WILL BE REMOVED EVENTUALLY
fuzzer = ["dep:rand", "dep:rand_distr"]  # Used for creating random paths, tries, and zipper movements
counters = [] # Enable features to inspect performance properties of tries.  Mainly useful when tuning performance of the PathMap internals.
graft_root_vals = [] # Enables an experimental change in behavior that causes `graft`, `graft_map`, `make_map`, `take_map`, and `join_map` to treat the value at the focus as part of the operation
slim_ptrs = [] # Enables use of a 64-bit inter-node pointer type (TrieNodeODRc)
slim_dispatch = [] # Experiment. Enables the 64-bit pointers to back the TaggedNodeRef and TaggedNodeRefMut types, WILL BE REMOVED EVENTUALLY
act_counters = ["arena_compact"] # LP: Question: Why isn't this code enabled by just counters + arena_compact???
viz = []
serialization = ["dep:libz-ng-sys"]

[target.'cfg(not(any(miri,target_arch="riscv64")))'.dependencies]
gxhash = {version="3.5"} # for dag_serialization, merkleization, and caching catamorphism

[target.'cfg(any(miri,target_arch="riscv64"))'.dependencies]
xxhash-rust = { version = "0.8.15", features = ["xxh64", "xxh3", "const_xxh3"] } # Replacement for gxhash running under miri

[dev-dependencies]
paste = "1.0"
divan = "0.1.14"
serde = { version = "1.0.163", features = ["derive"]}
csv = "1.1.6"
num = "0.4.3"
rand_distr = { version = "0.5.1" }
rand = { version = "0.9.0" }
tempfile = "3.19.1"
pasture-core = "0.5.0" # For pointcloud benchmark
pasture-io = "0.5.0" # For pointcloud benchmark

[[bench]]
name = "superdense_keys"
harness = false

[[bench]]
name = "sparse_keys"
harness = false

[[bench]]
name = "binary_keys"
harness = false

[[bench]]
name = "cities"
harness = false

[[bench]]
name = "shakespeare"
harness = false

[[bench]]
name = "parallel"
harness = false

[[bench]]
name = "serde"
harness = false

[[bench]]
name = "oeis"
harness = false

[[bench]]
name = "pointcloud"
harness = false

[[bench]]
name = "product_zipper"
harness = false

[workspace]
members = ["pathmap-derive"]
resolver = "2"