-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
273 lines (220 loc) · 7.94 KB
/
Cargo.toml
File metadata and controls
273 lines (220 loc) · 7.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
[package]
name = "libdictenstein"
version = "0.1.0"
edition = "2021"
rust-version = "1.70"
authors = ["Dylon Edwards <dylon.devo@gmail.com>"]
license = "Apache-2.0"
repository = "https://github.com/vinary-tree/libdictenstein"
description = "High-performance dictionary data structures (trie, DAWG, double-array trie, suffix automaton, lock-free durable persistent ART) behind one trait API; pairs with liblevenshtein for fuzzy matching"
keywords = ["trie", "dawg", "dictionary", "fuzzy-search", "automata"]
categories = ["algorithms", "data-structures", "text-processing"]
readme = "README.md"
exclude = ["docs/", "formal-verification/"]
[dependencies]
# Logging facade
log = "0.4"
# SmallVec for stack-allocated vectors (performance optimization)
smallvec = { version = "1.13", features = ["serde"] }
# Fast non-cryptographic hashing for internal use
rustc-hash = "1.1"
# Lock-free atomic Arc swapping for DynamicDawgU64
arc-swap = "1.7"
# Error handling
thiserror = "2.0"
# Shared lattice trait (join/meet); extracted leaf crate (cycle-break)
llattice = { path = "../llattice", version = "0.1" }
# Faster RwLock for DynamicDawg
parking_lot = { version = "0.12", optional = true }
# Serialization support (optional)
serde = { version = "1.0", features = ["derive", "rc"], optional = true }
bincode = { version = "2.0", features = ["serde"], optional = true }
serde_json = { version = "1.0", optional = true }
# Compression support (optional)
flate2 = { version = "1.0", optional = true }
# Protobuf support (optional)
prost = { version = "0.13", optional = true }
# PathMap as an optional dictionary backend
pathmap = { version = ">=0.2.2, <0.4", optional = true }
# Memory-mapped I/O for persistent data structures
memmap2 = { version = "0.9", optional = true }
# Lock-free MPMC channels for group commit
crossbeam-channel = { version = "0.5", optional = true }
# Cross-platform system information (memory, CPU, etc.)
sysinfo = { version = "0.37", optional = true }
# Parallel processing for merge operations
rayon = { version = "1.10", optional = true }
# Fast non-cryptographic hashing for node deduplication
xxhash-rust = { version = "0.8", features = ["xxh3"], optional = true }
# LRU cache for reverse lookups in vocabulary trie
lru = { version = "0.18", optional = true }
# Concurrent hash map for LRU tracking in eviction
dashmap = { version = "6.1", optional = true }
# (Removed) `im` was the RRB-tree backing for the lock-free overlay nodes; both
# the char and byte overlay nodes now use the tiered `ChildStore` (Inline/Heap)
# with owned `Child` slots, so `im` has no remaining users. Re-add here if a
# future module needs persistent vectors again.
# io_uring for O_DIRECT async I/O (Linux-only, optional)
io-uring = { version = "0.7", optional = true }
# libc for O_DIRECT flag and fallocate (Linux-only, used by io-uring-backend)
libc = { version = "0.2", optional = true }
[build-dependencies]
prost-build = { version = "0.13", optional = true }
[dev-dependencies]
criterion = "0.5"
tempfile = "3.8"
proptest = "1.4"
paste = "1.0" # For macro test name concatenation
hdrhistogram = "7.5" # High dynamic range histograms for latency benchmarks
rand = "0.8" # PRNG for randomized benchmark scenarios
loom = "0.7" # Bounded schedule exploration for concurrency correspondence tests
[features]
default = ["parking_lot"]
pathmap-backend = ["pathmap"]
serialization = ["serde", "bincode", "serde_json"]
compression = ["flate2"]
protobuf = ["prost", "prost-build"]
# Persistent Adaptive Radix Trie (disk-based dictionary).
# Enables the `serialization` feature transitively because the
# persistent_artrie* modules use `crate::serialization::bincode_compat`
# unconditionally — without this dep the module references resolve to a
# feature-gated crate::serialization that isn't visible.
persistent-artrie = ["memmap2", "parking_lot", "serde", "bincode", "sysinfo", "xxhash-rust", "lru", "dashmap", "crossbeam-channel", "serialization"]
# Group commit for WAL batching.
# Status: EXPERIMENTAL — measured 1.5-2x throughput regression on NVMe vs
# per-record sync in benches/group_commit_benchmarks.rs (recorded 2026-01-15).
# Retained for slower-storage scenarios (HDDs, remote block stores) and for
# revisiting under a different coordinator design. Do not enable on NVMe
# without re-benchmarking. See docs/persistence/group_commit_regression.md.
group-commit = ["persistent-artrie", "crossbeam-channel"]
# Parallel merge using rayon for multi-core acceleration
parallel-merge = ["persistent-artrie", "rayon"]
# io_uring-based block storage backend (Linux-only, requires kernel >= 5.1)
io-uring-backend = ["persistent-artrie", "dep:io-uring", "dep:libc"]
# Expose internal APIs for benchmarks (not in default features)
bench-internals = ["io-uring-backend"]
[lib]
name = "libdictenstein"
path = "src/lib.rs"
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
[profile.bench]
inherits = "release"
[[bench]]
name = "serialization_benchmarks"
harness = false
required-features = ["serialization", "pathmap-backend"]
[[bench]]
name = "persistent_artrie_benchmarks"
harness = false
required-features = ["persistent-artrie"]
[[bench]]
name = "persistent_artrie_char_benchmarks"
harness = false
required-features = ["persistent-artrie"]
[[bench]]
name = "loading_experiments"
harness = false
required-features = ["persistent-artrie"]
[[bench]]
name = "epoch_benchmarks"
harness = false
required-features = ["persistent-artrie"]
[[bench]]
name = "group_commit_benchmarks"
harness = false
required-features = ["group-commit"]
[[bench]]
name = "memory_pressure_benchmarks"
harness = false
required-features = ["persistent-artrie"]
[[bench]]
name = "adaptive_pool_benchmarks"
harness = false
required-features = ["persistent-artrie"]
[[bench]]
name = "per_node_log_benchmarks"
harness = false
required-features = ["persistent-artrie"]
[[bench]]
name = "batch_wal_benchmarks"
harness = false
required-features = ["persistent-artrie"]
[[bench]]
name = "write_locality_benchmarks"
harness = false
required-features = ["persistent-artrie"]
[[bench]]
name = "parallel_merge_benchmarks"
harness = false
required-features = ["parallel-merge"]
[[bench]]
name = "transaction_benchmarks"
harness = false
required-features = ["persistent-artrie"]
# Examples requiring persistent-artrie feature
[[example]]
name = "test_bench"
required-features = ["persistent-artrie"]
[[example]]
name = "test_bench_large"
required-features = ["persistent-artrie"]
[[example]]
name = "bench_disk_io"
required-features = ["persistent-artrie"]
[[example]]
name = "wal_size_test"
required-features = ["persistent-artrie"]
[[example]]
name = "wal_debug"
required-features = ["persistent-artrie"]
[[example]]
name = "exp_checkpoint_throughput"
required-features = ["persistent-artrie"]
[[example]]
name = "wal_compare"
required-features = ["persistent-artrie"]
[[example]]
name = "wal_flush_debug"
required-features = ["persistent-artrie"]
[[example]]
name = "insert_trace"
required-features = ["persistent-artrie"]
[[example]]
name = "prefix_diversity_test"
required-features = ["persistent-artrie"]
[[example]]
name = "streaming_merge_test"
required-features = ["persistent-artrie"]
[[example]]
name = "batched_merge_comparison"
required-features = ["persistent-artrie"]
[[example]]
name = "test_checkpoint_debug"
required-features = ["persistent-artrie"]
[[bench]]
name = "io_backend_benchmarks"
harness = false
required-features = ["persistent-artrie"]
[[bench]]
name = "io_uring_comparison_benchmarks"
harness = false
required-features = ["io-uring-backend"]
[[bench]]
name = "eviction_benchmarks"
harness = false
required-features = ["bench-internals"]
[[bench]]
name = "concurrent_read_vs_flush_benchmarks"
harness = false
required-features = ["persistent-artrie"]
[[bench]]
name = "lockfree_flip_benchmark"
# criterion provides its own main via criterion_main!, so the libtest harness
# must be disabled (otherwise libtest's main runs and criterion never executes).
harness = false
required-features = ["persistent-artrie", "bench-internals"]
[package.metadata.docs.rs]
all-features = true