warm-rust 0.6.5

Local-first search engine and agent memory: fast approximate nearest-neighbor and BM25 full-text search, encrypted stores, provable deletion, built on vector-symbolic architectures.
Documentation
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
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
[package]
name = "warm-rust"
version = "0.6.5"
edition = "2021"
rust-version = "1.89"
license = "Apache-2.0"
authors = ["WritersLogic, Inc. <david@writerslogic.com>"]
description = "Local-first search engine and agent memory: fast approximate nearest-neighbor and BM25 full-text search, encrypted stores, provable deletion, built on vector-symbolic architectures."
repository = "https://github.com/writerslogic/warm"
homepage = "https://writerslogic.com/warm"
documentation = "https://docs.rs/warm-rust"
keywords = ["vector-database", "vector-search", "full-text-search", "agent-memory", "rag"]
categories = ["database-implementations", "text-processing", "algorithms", "data-structures", "science"]
readme = "README.md"
include = [
    "/Cargo.toml",
    "/Cargo.lock",
    "/README.md",
    "/LICENSE",
    "/CHANGELOG.md",
    "/build.rs",
    "/src/**",
    "/tests/**",
    "/examples/**",
    "/benches/**",
    "/docs/**",
    "/benchmarks/embedding/embed_store_bench.rs",
    "/benchmarks/public/vector_glove_development.rs",
    "/benchmarks/public/vector_glove_diagnosis.rs",
    "/benchmarks/research/phase_resonator/cases.rs",
    "/benchmarks/results/holography_resonator_v1/baseline.rs",
]

[lib]
name = "writerslogic_warm"
crate-type = ["cdylib", "rlib"]

[dependencies]
napi = { version = "3.9", features = ["async", "serde-json"], optional = true }
napi-derive = { version = "3.5", optional = true }
pyo3 = { version = "0.30", features = ["extension-module", "abi3-py39"], optional = true }
numpy = { version = "0.30", optional = true }
tokio = { version = "1", optional = true }
serde = { version = "1.0", features = ["derive", "rc"] }
ts-rs = { version = "12", features = ["serde-compat"], optional = true }
schemars = { version = "1.2", features = ["derive"], optional = true }
serde_json = { version = "1.0", features = ["float_roundtrip"] }
serde_json_canonicalizer = { version = "0.4.1", optional = true }
flate2 = { version = "1.1", optional = true }
http = { version = "1", optional = true }
bincode = { version = "2.0", features = ["serde"] }
rand = "0.10"
crc32fast = "1.3"
lz4_flex = "0.14"
rayon = "1.8"
parking_lot = { version = "0.12", features = ["arc_lock"], optional = true }
memmap2 = "0.9"
bytemuck = "1"
mimalloc = { version = "0.1", default-features = false, optional = true }
anyhow = "1.0"
thiserror = "2.0"
tracing = "0.1"
clap = { version = "4.4", features = ["derive", "env"], optional = true }
foldhash = "0.2"
nalgebra = { version = "0.35", features = ["serde-serialize"] }
ed25519-dalek = { version = "3", features = ["rand_core"], optional = true }
zeroize = { version = "1", features = ["derive"], optional = true }
aes-gcm = { version = "0.11", optional = true }
argon2 = { version = "0.6", optional = true }
sha2 = { version = "0.11", optional = true }
coset = { version = "0.4", optional = true }
ciborium = { version = "0.2", optional = true }
bs58 = { version = "0.5", optional = true }
ureq = { version = "3", optional = true }
multibase = { version = "0.9", optional = true }
base64 = { version = "0.23", optional = true }
tempfile = "3"
axum = { version = "0.8", default-features = false, features = ["http1", "tokio", "json", "query"], optional = true }
subtle = { version = "2.6", optional = true }
# `server` feature: accept loop, TLS, snapshot archives, process metrics.
hyper = { version = "1", default-features = false, features = ["server", "http1", "http2"], optional = true }
hyper-util = { version = "0.1", default-features = false, features = ["server-auto", "server-graceful", "service", "tokio", "http1", "http2"], optional = true }
tower-service = { version = "0.3", optional = true }
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12"], optional = true }
tokio-rustls = { version = "0.26", default-features = false, features = ["ring", "tls12"], optional = true }
tar = { version = "0.4", default-features = false, optional = true }
libc = "0.2"
http-body-util = { version = "0.1", optional = true }
bytes = { version = "1", optional = true }
futures-util = { version = "0.3", default-features = false, optional = true }
# On-device model stages (`local-models`): CPU everywhere, Metal on macOS. Needs Rust >= 1.94:
# candle-core 0.11 uses `stdarch_neon_f16` on aarch64 (fails on 1.89; 1.90-1.93 untested).
candle-core = { version = "0.11", optional = true }
candle-nn = { version = "0.11", optional = true }
candle-transformers = { version = "0.11", optional = true }
tokenizers = { version = "0.23", default-features = false, features = ["fancy-regex"], optional = true }
rust-stemmers = "1.2.0"
# MCP server (`warm-mcp`): the official Rust SDK; client + child-process transport serve the tests.
rmcp = { version = "3.7", default-features = false, features = ["server", "client", "transport-io", "transport-child-process", "transport-streamable-http-server"], optional = true }
tokio-util = { version = "0.7", optional = true }
libm = { version = "0.2", optional = true }

[target.'cfg(target_os = "macos")'.dependencies]
candle-core = { version = "0.11", features = ["metal"], optional = true }
candle-nn = { version = "0.11", features = ["metal"], optional = true }
candle-transformers = { version = "0.11", features = ["metal"], optional = true }

# CUDA for the Modal image only, enabled from outside the crate with RUSTFLAGS="--cfg warm_cuda",
# so `--all-features` never needs nvcc.
[target.'cfg(warm_cuda)'.dependencies]
candle-core = { version = "0.11", features = ["cuda"], optional = true }
candle-nn = { version = "0.11", features = ["cuda"], optional = true }
candle-transformers = { version = "0.11", features = ["cuda"], optional = true }

[build-dependencies]
napi-build = { version = "2.2", optional = true }

[dev-dependencies]
criterion = "0.8"
proptest = "1.0"
tempfile = "3"
# TLS tests mint a throwaway certificate; ring keeps it free of the C toolchain.
rcgen = { version = "0.14", default-features = false, features = ["crypto", "ring", "pem"] }

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

[[example]]
name = "verify_cogmem_sample"
required-features = ["provenance"]

[[example]]
name = "emit_w3c_credential"
required-features = ["provenance"]

[[example]]
name = "zero_trust_demo"
required-features = ["security"]

[[bin]]
name = "security-probe"
path = "src/bin/research/security-probe.rs"
required-features = ["security", "server"]

[features]
default = []
# Command-line parsing (clap) for the binaries and examples that take arguments.
cli = ["dep:clap"]
# Global allocator of the public-bench binary only; never linked into the library.
mimalloc = ["dep:mimalloc"]
conversation-memory = ["sha2"]
node-api = ["napi", "napi-derive", "tokio", "tokio/rt", "napi-build", "dep:ts-rs"]
# Python bindings (pyo3 + maturin). Exposes the quantized-phase substrate. Build
# wheels with `maturin build --features python`; publishing is wired in
# .github/workflows/publish-pypi.yml and dormant until a `py-v*` tag is pushed.
python = ["pyo3", "dep:numpy"]
security = ["ed25519-dalek", "zeroize", "aes-gcm", "aes-gcm/zeroize", "argon2", "sha2"]
provenance = ["security", "dep:parking_lot", "coset", "ciborium", "bs58", "multibase", "base64", "dep:serde_json_canonicalizer", "dep:flate2", "dep:http"]
provenance-scitt = ["provenance", "ureq"]
# Experimental VSA research modules (algebraic_codebook, block_codes, bloom_memory,
# bundle_subset, connection_graph, counting_bloom_memory, operand_retriever,
# phase_graph), the connection and phase graph hooks on WarmCore, the qgraph
# diagnostics, projection_diagnostic and quantized IVF modules, the capped-union
# text encoder and the experiment binaries that exercise them. Off by default so
# they are not part of the published public API.
experimental = []
experimental-batch-pool = ["experimental"]
experimental-neighbor-admission = ["experimental"]
experimental-query-x4 = ["experimental"]
experimental-build-search = ["experimental"]
# On-device embedding, re-ranking, fact extraction and query rewriting (candle, Qwen3).
# Weights load from local directories only; the library never downloads.
local-models = ["dep:candle-core", "dep:candle-nn", "dep:candle-transformers", "dep:tokenizers", "sha2"]
# Pure-Rust local text embeddings: int8/f16 BERT-family inference, tokenizer from the model
# pack, sha256-pinned packs. No network code; packs load from a path, an env var or the cache.
local-embed = ["dep:tokenizers", "sha2", "dep:libm"]
# First-use download of the pinned upstream model files into the cache (adds ureq).
local-embed-download = ["local-embed", "ureq"]
# Experimental query-private similarity scoring (LWE, SimplePIR-style). Hides
# the query from the server only; see docs/PRIVATE-SEARCH.md for the limits.
private-search = ["zeroize", "rand/chacha"]
# HTTP service for the warm-sdk Python client (`warm-server` binary).
server = ["dep:parking_lot", "tokio", "tokio/rt-multi-thread", "tokio/macros", "tokio/net", "tokio/time", "tokio/sync", "tokio/io-util", "tokio/fs", "tokio/signal", "cli", "dep:schemars", "axum", "subtle", "sha2", "dep:hyper", "dep:hyper-util", "dep:tower-service", "dep:rustls", "dep:tokio-rustls", "dep:tar", "dep:http-body-util", "dep:bytes", "dep:futures-util"]
# MCP server over stdio and streamable HTTP (`warm-mcp` binary). Encryption at rest needs `security`;
# semantic recall needs `local-models`.
mcp = ["dep:parking_lot", "dep:rmcp", "dep:tokio-util", "tokio", "tokio/rt-multi-thread", "tokio/macros", "tokio/net", "tokio/time", "tokio/sync", "tokio/signal", "cli", "axum", "subtle", "dep:hyper", "dep:hyper-util", "dep:tower-service", "dep:futures-util", "tokio/io-util", "ureq"]

[[bin]]
name = "warm-embed"
path = "src/bin/warm-embed.rs"
required-features = ["local-embed", "cli"]

[[bin]]
name = "embed-store-bench"
path = "benchmarks/embedding/embed_store_bench.rs"
required-features = ["local-embed", "cli"]

[[bin]]
name = "warm-eval"
path = "src/bin/warm-eval.rs"

[[bin]]
name = "warm-admin"
path = "src/bin/warm-admin.rs"
required-features = ["cli"]

[[bin]]
name = "warm-format"
path = "src/bin/warm-format.rs"
required-features = ["cli"]

[[bin]]
name = "warm-server"
path = "src/bin/warm-server/main.rs"
required-features = ["server"]

[[bin]]
name = "warm-mcp"
path = "src/bin/warm-mcp.rs"
required-features = ["mcp"]

# Experiment harnesses that depend on `experimental` modules. Declared
# explicitly so they only build with `--features experimental`. Research drivers
# under src/bin/research have explicit paths; shipped tools stay in src/bin.
[[bin]]
name = "warm-benchmark-suite"
path = "src/bin/research/warm-benchmark-suite.rs"
required-features = ["experimental"]

[[bin]]
name = "warm-scaling"
path = "src/bin/research/warm-scaling.rs"
required-features = ["experimental"]

[[bin]]
name = "block-recovery-test"
path = "src/bin/research/block-recovery-test.rs"
required-features = ["experimental"]

[[bin]]
name = "public-bench"
path = "src/bin/research/public-bench.rs"
required-features = ["cli", "mimalloc"]

[[bin]]
name = "conversation-eval"
path = "src/bin/research/conversation-eval.rs"
required-features = ["conversation-memory", "cli"]

[[bin]]
name = "route-sweep"
path = "src/bin/research/route-sweep.rs"

[[bin]]
name = "bundle-subset-sweep"
path = "src/bin/research/bundle-subset-sweep.rs"
required-features = ["experimental"]


[[bin]]
name = "algebraic-codebook-bench"
path = "src/bin/research/algebraic-codebook-bench.rs"
required-features = ["experimental", "cli"]

[[bin]]
name = "private-query-bench"
path = "src/bin/research/private-query-bench.rs"
required-features = ["private-search"]

[[bin]]
name = "private-rank-bench"
path = "src/bin/research/private-rank-bench.rs"
required-features = ["private-search", "cli"]

[profile.release]
lto = true
# One unit lets LLVM inline across the whole crate: about 2% faster single-thread ingest,
# measured interleaved on NFCorpus (0.166 s vs 0.170 s), for a slower release build.
codegen-units = 1
# "debuginfo" keeps the symbol table: a fully stripped .node/.dylib fails to load on macOS 27 (mis-aligned LINKEDIT)
strip = "debuginfo"
opt-level = 3

[[example]]
name = "vector_glove_diagnosis"
required-features = ["experimental"]

[[example]]
name = "batched_vector_search"
required-features = ["experimental-batch-pool"]

[[example]]
name = "vector_discovery_diagnosis"
required-features = ["experimental", "sha2"]

[[bin]]
name = "vector-glove-diagnosis"
path = "benchmarks/public/vector_glove_diagnosis.rs"
required-features = ["experimental"]

[[bin]]
name = "vector-glove-development"
path = "benchmarks/public/vector_glove_development.rs"
required-features = ["experimental"]

# Shipped executables (the benchmark drivers the comparison measures, release binaries): the
# release build without the symbol table, which only backtraces and profilers read.
[profile.dist]
inherits = "release"
strip = "symbols"


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

[[bin]]
name = "encoder-eval"
path = "src/bin/research/encoder-eval.rs"

[[bin]]
name = "operand-retriever"
path = "src/bin/research/operand-retriever.rs"
required-features = ["experimental"]

[[bin]]
name = "forget-experiment"
path = "src/bin/research/forget-experiment.rs"
required-features = ["experimental"]

[[bin]]
name = "ann-failure-map"
path = "src/bin/research/ann-failure-map.rs"
required-features = ["experimental", "cli"]

[[bin]]
name = "vibe-rotation"
path = "src/bin/research/vibe-rotation.rs"
required-features = ["experimental", "cli"]

[[bin]]
name = "qag-diagnose"
path = "src/bin/research/qag-diagnose.rs"
required-features = ["experimental", "cli"]

[[example]]
name = "sparse_composition"
required-features = ["experimental"]

[[example]]
name = "qgraph_build_profile"
required-features = ["experimental"]

[[example]]
name = "encoder_version_probe"
required-features = ["experimental", "cli"]

# cargo-fuzz compiles with --cfg fuzzing (see src/bin/warm-server.rs and fuzz/).
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(fuzzing)"] }

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

[[bin]]
name = "sparse-bench"
path = "src/bin/research/sparse-bench.rs"
required-features = ["cli"]

[[bin]]
name = "memory-api-lme"
path = "src/bin/research/memory-api-lme.rs"
required-features = ["cli"]

[[bin]]
name = "memory-api-bench"
path = "src/bin/research/memory-api-bench.rs"
required-features = ["cli"]

[[bin]]
name = "warm-workload"
path = "src/bin/research/warm-workload.rs"
required-features = ["cli"]

[[bin]]
name = "durability-driver"
path = "src/bin/research/durability-driver.rs"
required-features = ["cli"]

[[bin]]
name = "document-search-bench"
path = "src/bin/research/document-search-bench.rs"
required-features = ["cli"]

[[example]]
name = "compaction_updates"
required-features = ["cli"]

[[example]]
name = "document_competition"
required-features = ["cli"]

[[example]]
name = "document_operations"
required-features = ["cli"]

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

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

[[bin]]
name = "amp-decode"
path = "src/bin/research/amp-decode.rs"

[[bin]]
name = "base-residual"
path = "src/bin/research/base-residual.rs"

[[bin]]
name = "bilinear-readout"
path = "src/bin/research/bilinear-readout.rs"

[[bin]]
name = "binding-baselines"
path = "src/bin/research/binding-baselines.rs"

[[bin]]
name = "binding-discriminator"
path = "src/bin/research/binding-discriminator.rs"

[[bin]]
name = "bloom-wall"
path = "src/bin/research/bloom-wall.rs"

[[bin]]
name = "capacity-campaign"
path = "src/bin/research/capacity-campaign.rs"

[[bin]]
name = "fixed-point-holographic"
path = "src/bin/research/fixed-point-holographic.rs"

[[bin]]
name = "warm-research-bench"
path = "src/bin/research/warm-research-bench.rs"

[[bin]]
name = "warm-stress"
path = "src/bin/research/warm-stress.rs"

[[bin]]
name = "kernel-capacity-sweep"
path = "src/bin/research/kernel-capacity-sweep.rs"

[[bin]]
name = "kernel-load-curve"
path = "src/bin/research/kernel-load-curve.rs"

[[bin]]
name = "noisy-retrieval"
path = "src/bin/research/noisy-retrieval.rs"

[[bin]]
name = "pinv-memory"
path = "src/bin/research/pinv-memory.rs"

[[bin]]
name = "resonator-bundle"
path = "src/bin/research/resonator-bundle.rs"

[[bin]]
name = "resonator-cleanup"
path = "src/bin/research/resonator-cleanup.rs"

[[bin]]
name = "resonator-factorize"
path = "src/bin/research/resonator-factorize.rs"

[[bin]]
name = "resonator-sweep"
path = "src/bin/research/resonator-sweep.rs"

[[bin]]
name = "ridge-memory"
path = "src/bin/research/ridge-memory.rs"