Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
90 lines (82 loc) · 3.85 KB
/
Copy pathCargo.toml
File metadata and controls
90 lines (82 loc) · 3.85 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
[package]
name = "high-performance-search-engine"
version = "0.1.0"
edition = "2021"
description = "hips: a small search engine for coding agents — hybrid BM25 + CodeRankEmbed code search over repositories, with exact Block-Max WAND underneath"
license = "MIT"
readme = "README.md"
repository = "https://github.com/jasonthird/high-performance-search-engine"
keywords = ["search-engine", "code-search", "bm25", "mcp", "agents"]
categories = ["text-processing", "algorithms", "database-implementations"]
[[bin]]
# Short, typeable name: this binary is meant to be invoked by hand and by an
# MCP client, not only through `cargo run`.
name = "hips"
path = "src/main.rs"
[dependencies]
anyhow = "1"
axum = "0.7"
bincode = "1"
bytemuck = "1.25.0"
clap = { version = "4", features = ["derive"] }
memmap2 = "0.9"
rayon = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
simd-json = "0.17.0"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "net"] }
# Optional: CodeRankEmbed inference (see `semantic` feature): hips' own
# ggml engine (crates/ggml-sys builds the vendored ggml with Vulkan on
# Linux, Metal on macOS) plus a WordPiece tokenizer fed from the GGUF.
ggml-sys = { path = "crates/ggml-sys", optional = true }
unicode-normalization = { version = "0.1", optional = true }
unicode_categories = { version = "0.1", optional = true }
# Watcher daemon: setsid on spawn, kill(pid, 0) liveness probes, signals.
libc = "0.2"
# Only the runtime is linked; grammar cdylibs live in grammars/.
tree-sitter = { version = "0.26", optional = true }
tree-sitter-language = { version = "0.1", optional = true }
libloading = { version = "0.8", optional = true }
ureq = { version = "2.12", optional = true }
tempfile = "3"
sha2 = { version = "0.10", optional = true }
notify = { version = "8.2.0", default-features = false, features = ["macos_fsevent"] }
pdf-extract = "0.12.0"
calamine = { version = "0.36.1", default-features = false }
quick-xml = "0.41"
zip = { version = "8.6", default-features = false, features = ["deflate-flate2"] }
# CoreML/ANE encoder backend and the optional Metal BP reorder.
[target.'cfg(target_os = "macos")'.dependencies]
objc2 = { version = "0.6.4", optional = true }
objc2-foundation = { version = "0.3.2", default-features = false, features = ["std", "NSString", "NSError", "NSPathUtilities", "NSProcessInfo", "NSBundle"], optional = true }
objc2-metal = { version = "0.3.2", optional = true }
objc2-core-ml = { version = "0.3.2", optional = true, default-features = false, features = ["std", "MLModel", "MLModelConfiguration", "MLMultiArray", "MLFeatureValue", "MLFeatureProvider", "MLDictionaryFeatureProvider", "MLFeatureDescription", "MLModelDescription", "block2"] }
[features]
default = ["treesitter"]
# Declaration-aware chunking through tree-sitter for ~40 languages; without it
# the keyword heuristic in `repo.rs` is used for every file.
treesitter = ["dep:tree-sitter", "dep:tree-sitter-language", "dep:libloading", "dep:ureq", "dep:sha2"]
# GPU-accelerated BP document reordering: zero-copy Metal via objc2
# (macOS only). Off by default.
gpu = ["dep:objc2", "dep:objc2-foundation", "dep:objc2-metal"]
# Hybrid code search: CodeRankEmbed + IVF/PQ over the same doc_ids as BM25.
# Off by default so the lexical engine stays dependency-light. The model is
# fetched as one GGUF from a pinned release (like the grammars).
semantic = [
"dep:ggml-sys",
"dep:unicode-normalization",
"dep:unicode_categories",
"dep:ureq",
"dep:sha2",
"dep:objc2",
"dep:objc2-foundation",
"dep:objc2-core-ml",
"dep:objc2-metal",
]
[dev-dependencies]
# Reference tokenizer for the WordPiece parity test (pure-Rust regex build).
tokenizers = { version = "0.21", default-features = false, features = ["unstable_wasm"] }
[workspace]
members = ["crates/ggml-sys"]
# The grammar libraries are their own workspace: never link them into hips.
exclude = ["grammars"]