-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathCargo.toml
More file actions
328 lines (274 loc) · 7.49 KB
/
Cargo.toml
File metadata and controls
328 lines (274 loc) · 7.49 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
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
[workspace]
members = [
"crates/codegraph-core",
"crates/codegraph-vector",
"crates/codegraph-parser",
"crates/codegraph-mcp",
"crates/codegraph-concurrent",
"crates/codegraph-graph",
"crates/codegraph-zerocopy",
"crates/codegraph-ai",
"crates/codegraph-mcp-core",
"crates/codegraph-mcp-tools",
"crates/codegraph-mcp-autoagents",
"crates/codegraph-mcp-rig",
"crates/codegraph-mcp-server",
"crates/codegraph-mcp-daemon",
]
exclude = ["scripts", "vendor/rmcp", "vendor/semchunk-rs"]
default-members = [
"crates/codegraph-core"
]
resolver = "2"
[workspace.package]
version = "1.0.0"
edition = "2021"
authors = ["CodeGraph Team"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/codegraph/embedding-system"
# Feature groups for common development scenarios
[workspace.metadata.cargo-features]
# Minimal build for MCP server development (fastest build times)
mcp-minimal = [
"ai-enhanced",
"embeddings-ollama",
"codegraph-ai/anthropic"
]
# MCP development with LM Studio support
mcp-lmstudio = [
"ai-enhanced",
"embeddings-ollama",
"embeddings-lmstudio",
"codegraph-ai/anthropic",
"codegraph-ai/openai-compatible"
]
# Full local stack (no cloud dependencies)
local-stack = [
"daemon",
"ai-enhanced",
"embeddings-ollama",
"embeddings-lmstudio",
"embeddings-local",
"codegraph-ai/openai-compatible",
"autoagents-experimental"
]
# Cloud-enabled build
cloud-enabled = [
"daemon",
"ai-enhanced",
"cloud",
"embeddings-jina",
"codegraph-ai/anthropic",
"codegraph-ai/openai-llm",
"server-http",
"autoagents-experimental"
]
# Everything (development/testing)
full = [
"daemon",
"ai-enhanced",
"cloud",
"embeddings",
"embeddings-local",
"embeddings-openai",
"embeddings-ollama",
"embeddings-jina",
"embeddings-lmstudio",
"codegraph-ai/anthropic",
"codegraph-ai/openai-llm",
"codegraph-ai/openai-compatible",
"server-http",
"autoagents-experimental"
]
[workspace.dependencies]
fastrand = "2.0"
governor = { version = "0.10.1" }
lazy_static = "1.4.0"
# Async Runtime
tokio = { version = "1.39", features = ["full"] }
async-trait = "0.1"
futures = "0.3"
rmcp = { version = "0.12.0", features = ["server", "transport-io", "transport-streamable-http-server"] }
semchunk-rs = { version = "0.1.1" }
tokenizers = { version = "0.22.2", default-features = false, features = ["http", "fancy-regex", "onig"] }
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
toml = "0.9.5"
# Zero-copy serialization
rkyv = { version = "0.8.8", features = ["alloc", "std"] }
bytecheck = "0.8"
rend = "0.5"
# Error Handling
thiserror = "2.0.17"
anyhow = "1.0"
# Utilities
regex = "1.12"
sha2 = "0.10"
uuid = { version = "1.6", features = ["v4", "serde"] }
chrono = { version = "0.4", features = ["serde"] }
# Parallel Processing
rayon = "1.8"
crossbeam-channel = "0.5"
crossbeam-utils = "0.8"
crossbeam-queue = "0.3"
crossbeam-skiplist = "0.1"
arc-swap = "1.7"
# System Information
num_cpus = "1.16"
sysinfo = "0.37.2"
# Scientific computing
ndarray = "0.16.1"
# OpenAI API client
# Minimize reqwest features for smaller binaries; prefer system TLS
reqwest = { version = "0.12", default-features = false, features = ["json", "stream", "native-tls"] }
# ONNX ort format
# ort = "=2.0.0-rc.10"
ort = { version = "2", features = [ "load-dynamic" ] }
# Additional utilities
bincode = { version = "2.0", features = ["serde"] }
dashmap = "6.0"
parking_lot = "0.12"
tokio-util = "0.7"
tokio-uring = { version = "0.5.0" }
# File system monitoring and diff processing
notify = "8.2.0"
similar = "2.4"
memmap2 = "0.9"
flate2 = "1.0"
# Compression algorithms
zstd = "0.13"
lz4_flex = "0.11"
# Version overrides for transitive crates we rely on
cedar-policy = "2.5.1"
cedar-policy-core = "2.5.1"
cedar-policy-validator = "2.5.1"
dirs = "6.0.0"
generic-array = "0.14.9"
matchit = "0.8.6"
pdqselect = "0.1.1"
# AutoAgents
autoagents = "*"
autoagents-derive = "*"
# Moved MCP crate dependencies
nix = { version = "0.30.1", features = ["process", "signal"] }
# AutoAgents
globset = "0.4"
ignore = "0.4"
rand = "0.9.2"
# Git integration
git2 = "0.20"
# Tree-sitter for parsing - Enhanced error handling and pooling implemented
tree-sitter = "0.25"
tree-sitter-rust = "0.24"
tree-sitter-python = "0.25.0"
tree-sitter-javascript = "0.25"
tree-sitter-typescript = "0.23"
tree-sitter-go = "0.25.0"
tree-sitter-java = "0.23"
tree-sitter-cpp = "0.23"
# Additional language support - Revolutionary universal programming language coverage
tree-sitter-swift = "0.7.1"
tree-sitter-kotlin = "0.3.5"
tree-sitter-c-sharp = "0.23.0"
tree-sitter-ruby = "0.23.0"
tree-sitter-php = "0.24.2"
tree-sitter-dart = "0.0.4"
# GraphQL
async-graphql = "7.0"
async-graphql-axum = "7.0"
# Web framework
axum = "0.8"
tower = { version = "0.5.2", features = ["util"] }
tower-http = "0.6.6"
hyper = "1.7.0"
http-body-util = "0.1.2"
http = "1.3.1"
prometheus = { version = "0.14.0", features = ["process"] }
# OpenAPI / Swagger documentation for Axum
utoipa = { version = "5.4.0", features = ["axum_extras", "uuid", "chrono"] }
utoipa-swagger-ui = { version = "9.0.2", features = ["axum"] }
# Memory leak detection and tracking (optional, feature-gated in binaries)
memscope-rs = "0.1.4"
# WebSocket support
tokio-tungstenite = { version = "0.28", features = ["native-tls"] }
url = "2.5"
# Tracing and logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "registry"] }
tracing-indicatif = "0.3.1"
tracing-appender = "0.2"
once_cell = "1.19"
hashbrown = "0.16.0"
rustc-hash = "2.1.1"
bytes = "1.6"
# Memory allocator + profiling
mimalloc = "0.1.48"
backtrace = "0.3"
# Configuration
config = "0.15.15"
schemars = "1.0.4"
secrecy = { version = "0.10.3", features = ["serde"] }
chacha20poly1305 = { version = "0.10", features = ["std"] }
base64 = "0.22"
# CLI
clap = { version = "4.5", features = ["derive", "cargo", "env", "wrap_help"] }
colored = "3.0.0"
indicatif = "0.18.0"
atty = "0.2.14"
# Security
jsonwebtoken = "9.3"
argon2 = "0.5"
# Testing
tempfile = "3.23"
tokio-test = "0.4"
approx = "0.5"
criterion = { version = "0.7.0", features = ["html_reports", "async_tokio"] }
# LRU cache utility
lru = "0.16.1"
# Internal crates
codegraph-core = { path = "crates/codegraph-core" }
codegraph-graph = { path = "crates/codegraph-graph" }
codegraph-parser = { path = "crates/codegraph-parser" }
codegraph-vector = { path = "crates/codegraph-vector", default-features = false }
codegraph-mcp = { path = "crates/codegraph-mcp" }
codegraph-zerocopy = { path = "crates/codegraph-zerocopy" }
codegraph-ai = { path = "crates/codegraph-ai" }
# Development dependencies
[profile.release]
# Performance-oriented release (kept as-is for general builds)
opt-level = 3
lto = "fat"
codegen-units = 1
panic = "abort"
strip = true
[profile.bench]
inherits = "release"
debug = true
[profile.dev]
opt-level = 0 # Faster compilation (0 = no optimization)
debug = true
incremental = true
codegen-units = 256 # Parallel codegen for faster builds
[profile.test]
opt-level = 1
debug = true
# Super-fast dev profile for rapid iteration
[profile.fast-dev]
inherits = "dev"
opt-level = 0
incremental = true
codegen-units = 256
debug = 1 # Line numbers only, not full debug info
lto = false
panic = "unwind"
# Size-optimized release profile for smallest possible binaries
[profile.release-size]
inherits = "release"
opt-level = "z"
codegen-units = 1
lto = "fat"
panic = "abort"
strip = true
debug = false
overflow-checks = false