-
Notifications
You must be signed in to change notification settings - Fork 76
Expand file tree
/
Copy pathCargo.toml
More file actions
91 lines (80 loc) · 3.15 KB
/
Copy pathCargo.toml
File metadata and controls
91 lines (80 loc) · 3.15 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
[package]
name = "codegraph-vector"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
description = "Vector storage and similarity search using FAISS for CodeGraph"
[dependencies]
codegraph-core = { workspace = true }
codegraph-graph = { path = "../codegraph-graph", features = ["surrealdb"] }
ndarray = { workspace = true, optional = true }
serde = { workspace = true }
serde_json = { workspace = true }
sha2 = { workspace = true }
bincode = { workspace = true }
thiserror = { workspace = true }
anyhow = { workspace = true }
tracing = { workspace = true }
async-trait = { workspace = true }
tokio = { workspace = true }
parking_lot = { workspace = true }
uuid = { workspace = true }
memmap2 = { workspace = true, optional = true }
flate2 = { workspace = true, optional = true }
dashmap = { workspace = true }
rayon = { workspace = true }
crossbeam-channel = { workspace = true }
chrono = { workspace = true }
futures = { workspace = true }
num_cpus = { workspace = true }
unicode-normalization = "0.1"
# Local embeddings (Candle) - optional via feature.
# Per-target split: enable the metal backend on macOS; everywhere else build CPU-only
# (the objc2 backend used by `metal` is Apple-only). See the target tables below.
tokenizers = { workspace = true } # Always available for token counting in Jina provider
hf-hub = { version = "0.4", optional = true, default-features = true, features = ["tokio"] }
lru = { workspace = true }
# OpenAI API client
reqwest = { workspace = true, optional = true }
# ONNX Runtime provider (optional)
ort = { version = "2.0.0-rc.10", optional = true, default-features = false, features = ["std", "ndarray", "download-binaries"] }
semchunk-rs = { workspace = true }
fxhash = "0.2.1"
# Apple-only: enable candle's metal backend on macOS.
[target.'cfg(target_os = "macos")'.dependencies]
candle-core = { version = "0.9.1", optional = true, default-features = false, features = ["metal"] }
candle-nn = { version = "0.9.1", optional = true, default-features = false }
candle-transformers = { version = "0.9.1", optional = true, default-features = false }
# Non-Apple: CPU-only candle so local-embeddings still builds on Windows/Linux.
[target.'cfg(not(target_os = "macos"))'.dependencies]
candle-core = { version = "0.9.1", optional = true, default-features = false }
candle-nn = { version = "0.9.1", optional = true, default-features = false }
candle-transformers = { version = "0.9.1", optional = true, default-features = false }
[dev-dependencies]
tokio-test = { workspace = true }
tempfile = { workspace = true }
approx = { workspace = true }
criterion = { workspace = true }
fastrand = { workspace = true }
tracing-subscriber = { workspace = true }
dotenvy = "0.15"
[features]
# Minimal defaults; opt-in providers from dependents
default = []
persistent = ["dep:memmap2", "dep:flate2"]
openai = ["dep:reqwest"]
local-embeddings = [
"dep:candle-core",
"dep:candle-nn",
"dep:candle-transformers",
"dep:hf-hub",
]
onnx = ["dep:ort", "dep:hf-hub", "dep:ndarray"]
onnx-coreml = ["onnx"]
ollama = ["dep:reqwest"]
jina = ["dep:reqwest"]
lmstudio = ["dep:reqwest"]
[[example]]
name = "rag_demo"
path = "examples/rag_demo.rs"