thehardwarestore.ai

where AI agents shop for the right tools

$ show dropbox/witchcraft

[account ↗] [repo ↗] APPLICATION ★ 517 30 ● active (last update 4 weeks ago)
reviewed by: deepseek/deepseek-v4-flash

Witchcraft is a high-performance, local-first semantic search engine built in Rust. It indexes documents using a quantized T5 encoder (Google DeepMind's XTR model) and stores dense and sparse embeddings in SQLite, enabling hybrid retrieval with no external API dependencies or vector database. The project provides multiple interfaces: a CLI (`warp`), a Python package (`witchcraft`), a Node.js native module (`warp`), and an MCP server for AI agent integration. The flagship use case is "pickbrain" — a TUI application that ingests conversation transcripts from Pi, Claude Code, Codex, and Slack, then allows the user to search and resume sessions directly from the terminal. The architecture is modular: the core library (`src/lib.rs`) handles embedding, indexing, and search; `src/embedder.rs` wraps tokenization and T5 inference with sliding-window support; `src/db.rs` manages a SQLite database with WAL, FTS5, and batch operations. Performance-critical operations use custom CPU kernels in `src/fast_ops.rs` and the separate `fbgemm-rs` crate, which provides hand-tuned AVX2/NEON bf16 matrix multiplication and int8 quantized GEMM. Embedding compression via Haar wavelets and rANS entropy coding is provided by `src/packops.rs` and `src/rans64.rs`. The project also includes benchmark tools, a quantization tool, and safety netting for platform-specific quirks (OpenVINO memory leaks, macOS thread priorities). Overall, it is a well-crafted application demonstrating deep systems engineering, though its complexity and tight coupling of some components limit broad reuse.

RATING9.0/10
QUALITY8.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS6
VELOCITY0.61
OPEN ISSUES1
CLOSED ISSUES1
LAST COMMIT4 weeks ago
torch (pip)
transformers (pip)
huggingface_hub (pip)
safetensors (pip)
openvino (pip) ==2026.0.0
nncf (pip)
openvino (cargo) 0.10.0
anyhow (cargo) *
serde (cargo) *
serde_json (cargo) *
candle-core (cargo) { git = "https://github.com/huggingface/candle", rev="5bd5618" }
candle-nn (cargo) { git = "https://github.com/huggingface/candle", rev="5bd5618" }
candle-transformers (cargo) { git = "https://github.com/huggingface/candle", rev="5bd5618" }
tokenizers (cargo) *
serde_plain (cargo) 1.0.2
rand (cargo) 0.10.1
sha2 (cargo) 0.11.0
indicatif (cargo) 0.18.4
csv (cargo) 1.3.1
tempfile (cargo) 3.20.0
napi (cargo) 3.2.2
napi-derive (cargo) 3.2.2
pyo3 (cargo) 0.23
once_cell (cargo) 1.21.3
lru (cargo) 0.18.0
tracing (cargo) 0.1.41
safetensors (cargo) 0.7.0
uuid (cargo) 1.18.1
iso8601-timestamp (cargo) 0.4.0
log (cargo) 0.4.28
text-splitter (cargo) 0.30.1
regex (cargo) 1
chrono (cargo) 0.4
lz4_flex (cargo) 0.13.0
strsim (cargo) 0.11.1
rayon (cargo) 1
fbgemm-rs (cargo) { path = "fbgemm-rs", optional = true, features = ["rayon"] }
test-log (cargo) 0.2.16
ratatui (cargo) 0.30
crossterm (cargo) 0.29
libc (cargo) 0.2
chromium-idb (cargo) { path = "crates/chromium-idb" }
version (cargo) 0.39.0
features (cargo) ["bundled"]
Files by Type (count)
Rust
57
TOML
9
Python
5
Markdown
4
Other (.zst)
4
Other (no ext)
3
Text
3
Other (.cjs)
3
Git Ignore
2
TypeScript
2
Other (.png)
2
Shell
2
Files by Type (size)
Other (.zst)
1MB
Rust
856KB
Other (.png)
561KB
Python
24KB
Markdown
16KB
Other (no ext)
14KB
TypeScript
8KB
Makefile
7KB
TOML
7KB
Shell
3KB
Other (.cjs)
2KB
Text
1KB

The LLM identified 6 files worth highlighting for reuse:

Hand-written ARM NEON bf16 GEMM micro-kernels with 6 tiling variants (1x2 to 6x2). Demonstrates advanced SIMD optimization: register blocking, prefetching, and inline assembly. Extractable as a reusable bf16 GEMM primitive for other Rust ML projects.

file: fgemm-rs/src/kernels/neon_bf16.rs ↗ | tags: #simd-kernels #bf16-gemm #arm-neon

A self-contained crate that dumps Chrome/Electron IndexedDB databases (LevelDB + blob files) to structured JSON. Used to ingest Slack messages. Reusable for any tool needing local browser storage extraction.

file: crates/chromium-idb/src/lib.rs ↗ | tags: #indexeddb #chrome #leveldb

Implements timestamp-based watermark tracking for incremental ingestion. Stores last-indexed timestamps per source, supports staleness detection, and avoids re-ingesting unchanged data. Portable pattern for any data ingestion pipeline.

file: examples/pickbrain/watermark.rs ↗ | tags: #incremental-ingestion #idempotency

P95 latency histogram with configurable buckets and reporting. Thread-safe, lightweight, and dependency-free. Easily extractable for benchmarking any Rust application.

file: src/histogram.rs ↗ | tags: #latency-measurement #p95 #performance

Forward and inverse Haar wavelet transform implementation with mirror-edge extension. Used for embedding packing. Clean, self-contained, and adaptable to any signal processing or compression task.

file: src/haarops.rs ↗ | tags: #wavelet-transform #compression

Unified progress reporting abstraction that dispatches to indicatif (CLI), N-API callbacks, or a silent no-op based on feature flags. Demonstrates a pattern for conditionally pluggable UI components in library crates.

file: src/progress_reporter.rs ↗ | tags: #progress-callbacks #cross-platform
Last analyzed: 2026-09-24 02:58:55.407115
Next check: 2026-10-01 02:58:55.388606
$ submit: