-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCargo.toml
More file actions
160 lines (132 loc) · 4.7 KB
/
Cargo.toml
File metadata and controls
160 lines (132 loc) · 4.7 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
[workspace]
members = [".", "crates/codescout-embed", "crates/librarian-mcp"]
resolver = "2"
[workspace.package]
edition = "2021"
license = "Apache-2.0"
authors = ["Marius Ailinca"]
[workspace.dependencies]
anyhow = "1"
thiserror = "2"
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["preserve_order"] }
tokio = { version = "1", features = ["full"] }
tracing = "0.1"
rusqlite = { version = "0.39", features = ["bundled"] }
sqlite-vec = "0.1"
[package]
name = "codescout"
version = "0.9.0"
edition = "2021"
description = "High-performance coding agent toolkit MCP server"
repository = "https://github.com/mareurs/codescout"
license = "MIT"
rust-version = "1.75"
exclude = [".codescout/", "docs/", "scripts/", ".github/", "CLAUDE.md"]
[lib]
name = "codescout"
path = "src/lib.rs"
[[bin]]
name = "codescout"
path = "src/main.rs"
[dependencies]
tikv-jemallocator = "0.6"
fs2 = "0.4"
fs4 = "0.12"
# Async runtime
tokio = { version = "1", features = ["full"] }
# MCP protocol (Rust SDK)
rmcp = { version = "1.3", features = ["server", "macros", "transport-io", "elicitation", "schemars"] }
schemars = "1"
# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["preserve_order"] }
toml = "1"
# Error handling
anyhow = "1"
thiserror = "2"
async-trait = "0.1"
# Sibling crates
codescout-embed = { path = "crates/codescout-embed" }
# Logging / tracing
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] }
tracing-appender = "0.2"
# CLI
clap = { version = "4", features = ["derive"] }
# Git integration
git2 = "0.20"
# Database — SQLite with bundled libsqlite3
# sqlite-vec provides vec_distance_cosine for in-SQL similarity computation
rusqlite = { version = "0.39", features = ["bundled"] }
sqlite-vec = "0.1"
# File system traversal (respects .gitignore)
walkdir = "2"
ignore = "0.4"
globset = "0.4"
# Text / regex
regex = "1"
# Content hashing (incremental indexing)
sha2 = "0.10"
hex = "0.4"
# LSP protocol types
lsp-types = "0.97"
# URI handling (file:// ↔ path conversion, handles Windows drive letters + percent-encoding)
url = "2"
percent-encoding = "2"
# AST parsing (tree-sitter)
tree-sitter = "0.26"
# HTTP client and local ONNX embeddings are now provided by the codescout-embed crate.
tree-sitter-rust = "0.24.0"
tree-sitter-python = "0.25.0"
tree-sitter-go = "0.25.0"
tree-sitter-typescript = "0.23.2"
tree-sitter-java = "0.23.5"
tree-sitter-kotlin-ng = "1.1.0"
tree-sitter-html = "0.23"
tree-sitter-css = "0.23"
tree-sitter-bash = "0.23"
libc = "0.2.182"
# Temp files (buffer reference resolution in run_command)
tempfile = "3"
# Dashboard web server (behind "dashboard" feature) and HTTP transport (behind "http" feature)
axum = { version = "0.8", features = ["json"], optional = true }
tower-http = { version = "0.6", features = ["cors", "limit", "timeout"], optional = true }
open = { version = "5", optional = true }
tokio-util = "0.7"
uuid = { version = "1.20.0", features = ["v4"] }
# Poison-free, faster synchronization primitives for short-held locks in async
# hot paths where std::sync poisoning is a correctness footgun.
parking_lot = "0.12"
[features]
default = ["remote-embed", "local-embed", "dashboard", "http"]
dashboard = ["dep:axum", "dep:tower-http", "dep:open"]
http = ["dep:axum", "dep:tower-http", "rmcp/transport-streamable-http-server"]
# Remote embedding via OpenAI-compatible HTTP API (Ollama, OpenAI, etc.)
remote-embed = ["codescout-embed/remote-embed"]
# Local CPU embedding via fastembed-rs (ONNX Runtime + HuggingFace model hub).
# First use downloads the chosen model (~20-300MB) to ~/.cache/huggingface/hub/.
local-embed = ["codescout-embed/local-embed"]
# Local embedding via candle (HuggingFace Rust ML — adds significant compile time)
# candle-embed = ["dep:candle-core", "dep:candle-transformers", "dep:candle-nn", "dep:hf-hub", "dep:tokenizers"]
# E2E tests — require real LSP servers installed
e2e = ["e2e-rust", "e2e-python", "e2e-typescript", "e2e-kotlin", "e2e-java"]
e2e-rust = [] # needs: rust-analyzer
e2e-python = [] # needs: pyright-langserver
e2e-typescript = [] # needs: typescript-language-server
e2e-kotlin = [] # needs: kotlin-lsp
e2e-java = [] # needs: jdtls
[profile.release]
opt-level = 3
lto = "thin"
strip = true
# Abort on panic rather than unwind — prevents a future panic from leaving the
# MCP server in a half-alive state where the process runs but no responses are
# sent. With abort, any panic kills the process immediately and Claude Code
# triggers a clean reconnect via `/mcp`. (BUG-021 investigation, 2026-03-03)
panic = "abort"
[dev-dependencies]
tempfile = "3"
tower = "0.5"
filetime = "0.2"
tokio = { version = "1", features = ["test-util"] }