-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCargo.toml
More file actions
220 lines (197 loc) · 8.27 KB
/
Copy pathCargo.toml
File metadata and controls
220 lines (197 loc) · 8.27 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
[package]
name = "tracedecay"
version = "0.0.32"
edition = "2021"
description = "Code intelligence tool that builds a semantic knowledge graph from Rust, Go, Java, Scala, TypeScript, Python, C, C++, Kotlin, C#, Swift, and many more codebases"
license = "MIT"
repository = "https://github.com/ScriptedAlchemy/tracedecay"
homepage = "https://github.com/ScriptedAlchemy/tracedecay"
readme = "README.md"
keywords = ["code-intelligence", "knowledge-graph", "mcp", "tree-sitter", "claude"]
categories = ["development-tools", "command-line-utilities"]
# Explicit whitelist so `cargo package`/`cargo publish` ship everything the
# build needs — including the PREBUILT dashboard dist bundles, which are
# gitignored (an `exclude`-style package can never pick them up). Run
# `cd dashboard && npm ci && npm run build` before packaging; build.rs fails
# fast (or auto-builds from a git checkout) when they are missing.
include = [
"/CHANGELOG.md",
"/LICENSE",
"/README.md",
"/rust-toolchain.toml",
"/.cargo/config.toml",
"/build.rs",
"/src/**",
"/benches/**",
"/examples/**",
"/benchmarks/queries/default.toml",
"/plugin/**",
"/vendor/**",
"/dashboard/shell/dist/**",
"/dashboard/holographic/dist/**",
"/dashboard/lcm/dist/**",
"/dashboard/graph/dist/**",
"/dashboard/code-diagnostics/dist/**",
"/dashboard/savings/dist/**",
"/dashboard/settings/dist/**",
"/dashboard/hermes-wrapper/manifest.json",
"/dashboard/hermes-wrapper/plugin_api.py",
"/dashboard/hermes-wrapper/src/**",
]
[features]
default = ["full", "token-counting"]
# Exact token counting for the Savings & Cost dashboard (tiktoken BPE).
# Embeds the o200k_base/cl100k_base vocabularies (~4 MB of binary weight);
# vocab decoding is lazy (first count pays it, idle servers never do).
# Disable for a leaner binary — cost estimation falls back to chars/4.
token-counting = ["dep:tiktoken-rs"]
# Lite tier (11 languages) — always compiled, no feature flag needed:
# Rust, Go, Java, Scala, TypeScript/JavaScript, Python, C, C++, Kotlin, C#, Swift
lite = ["dep:tracedecay-medium-treesitters"]
medium = ["lang-dart", "lang-pascal", "lang-php", "lang-ruby", "lang-bash", "lang-protobuf", "lang-powershell", "lang-nix", "lang-vbnet"]
full = ["medium", "lang-lua", "lang-zig", "lang-objc", "lang-perl", "lang-batch", "lang-fortran", "lang-cobol", "lang-msbasic2", "lang-gwbasic", "lang-qbasic", "lang-dockerfile", "lang-glsl", "lang-wgsl", "lang-hlsl", "lang-metal", "lang-markdown", "lang-r", "lang-sql", "lang-julia", "lang-haskell", "lang-ocaml", "lang-clojure", "lang-erlang", "lang-elixir", "lang-fsharp", "lang-quint", "lang-toml", "lang-lean"]
# Language features backed by the bundled tree-sitter grammar crate.
lang-dart = ["dep:tracedecay-medium-treesitters"]
lang-pascal = ["dep:tracedecay-large-treesitters"]
lang-php = ["dep:tracedecay-medium-treesitters"]
lang-ruby = ["dep:tracedecay-medium-treesitters"]
lang-bash = ["dep:tracedecay-medium-treesitters"]
lang-protobuf = ["dep:tracedecay-large-treesitters"]
lang-powershell = ["dep:tracedecay-large-treesitters"]
lang-nix = ["dep:tracedecay-large-treesitters"]
lang-vbnet = ["dep:tracedecay-large-treesitters"]
lang-lua = ["dep:tracedecay-medium-treesitters"]
lang-zig = ["dep:tracedecay-large-treesitters"]
lang-objc = ["dep:tracedecay-large-treesitters"]
lang-perl = ["dep:tracedecay-large-treesitters"]
lang-batch = ["dep:tracedecay-large-treesitters"]
lang-fortran = ["dep:tracedecay-large-treesitters"]
lang-cobol = ["dep:tracedecay-large-treesitters"]
lang-msbasic2 = ["dep:tracedecay-large-treesitters"]
lang-gwbasic = ["dep:tracedecay-large-treesitters"]
lang-qbasic = ["dep:tracedecay-large-treesitters"]
lang-dockerfile = ["dep:tracedecay-large-treesitters"]
lang-glsl = ["dep:tracedecay-large-treesitters"]
lang-wgsl = []
lang-hlsl = ["dep:tree-sitter-hlsl"]
lang-metal = ["dep:tracedecay-large-treesitters"]
lang-markdown = ["dep:tracedecay-large-treesitters"]
lang-r = ["dep:tracedecay-large-treesitters"]
lang-sql = ["dep:tracedecay-large-treesitters"]
lang-julia = ["dep:tracedecay-large-treesitters"]
lang-haskell = ["dep:tracedecay-large-treesitters"]
lang-ocaml = ["dep:tracedecay-large-treesitters"]
lang-clojure = ["dep:tracedecay-large-treesitters"]
lang-erlang = ["dep:tracedecay-large-treesitters"]
lang-elixir = ["dep:tracedecay-large-treesitters"]
lang-fsharp = ["dep:tracedecay-large-treesitters"]
lang-quint = ["dep:tracedecay-large-treesitters"]
lang-toml = ["dep:tracedecay-large-treesitters"]
lang-lean = ["dep:tracedecay-large-treesitters"]
test-transport = []
[lib]
name = "tracedecay"
[[bin]]
name = "tracedecay"
path = "src/main.rs"
[dependencies]
axum = "0.8"
tower = "0.5"
libsql = "0.9.30"
tree-sitter = "0.26"
tree-sitter-language = "0.1"
tracedecay-medium-treesitters = { package = "tokensave-medium-treesitters", version = "0.2.0", optional = true }
tracedecay-large-treesitters = { package = "tokensave-large-treesitters", version = "0.5.0", optional = true }
clap = { version = "4.6", features = ["derive"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "1"
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12"] }
ureq = { version = "3", features = ["json"] }
url = "2"
webpki-roots = "1"
tokio = { version = "1", features = ["full"] }
thiserror = "2"
tracing = "0.1"
sha2 = "0.11"
glob = "0.3"
walkdir = "2"
ignore = "0.4"
gix = { version = "0.81", default-features = false, features = ["revision", "blob-diff", "sha1"] }
dirs = "6"
hex = "0.4"
rayon = "1"
bincode = "1.3"
getrandom = "0.2"
self-replace = "1"
memmap2 = "0.9"
crossterm = "0.28"
fs2 = "0.4"
reflink-copy = "0.1"
sysinfo = { version = "0.32", default-features = false, features = ["system"] }
tree-sitter-hlsl = { version = "0.2.0", optional = true }
amari-holographic = "0.23.0"
regex = "1.12.3"
open = "5.3"
tiktoken-rs = { version = "0.12", optional = true }
# Raw filesystem watcher for the daemon git-metadata watcher (src/daemon/git_watch.rs).
# We deliberately use the raw watcher (not notify-debouncer-full) and debounce
# ourselves so a monorepo's git-ref churn coalesces into a single sync.
notify = "6"
[target.'cfg(not(windows))'.dependencies]
flate2 = "1"
tar = "0.4"
[target.'cfg(windows)'.dependencies]
zip = { version = "8", default-features = false, features = ["deflate"] }
[build-dependencies]
logo-art = "0.2"
cc = "1"
[dev-dependencies]
tempfile = "3"
sha2 = "0.11"
hex = "0.4"
filetime = "0.2"
criterion = { version = "0.5", features = ["async_tokio", "html_reports"] }
# test-util enables tokio::test(start_paused = true) so timer-driven unit
# tests (daemon restart-grace windows) run on virtual time instead of real
# sleeps.
tokio = { version = "1", features = ["full", "test-util"] }
jsonschema = { version = "0.46.8", default-features = false }
[[bench]]
name = "large_repos"
harness = false
# Compile the SQLite stack with optimizations even in dev/test builds. The
# bundled SQLite C sources in libsql-ffi are otherwise built at -O0 (cc honors
# cargo's OPT_LEVEL), and nearly every test creates databases and runs many
# queries — unoptimized SQLite dominates test runtime, worst on Windows CI.
# The `test` profile inherits these dev package overrides. Deliberately
# scoped to the libsql and tokenizer layers only; do not blanket-override "*".
[profile.dev.package.libsql-ffi]
opt-level = 2
[profile.dev.package.libsql-sys]
opt-level = 2
[profile.dev.package.libsql-rusqlite]
opt-level = 2
# The first token count pays a one-time BPE model load (embedded-vocabulary
# base64 decode + BPE regex compile) that costs seconds in unoptimized
# builds; the dashboard token-count warm task and its tests hit it on every
# test-process start.
[profile.dev.package.tiktoken-rs]
opt-level = 2
[profile.dev.package.base64]
opt-level = 2
[profile.dev.package.fancy-regex]
opt-level = 2
[profile.dev.package.regex]
opt-level = 2
[profile.dev.package.regex-automata]
opt-level = 2
[profile.dev.package.regex-syntax]
opt-level = 2
# libsql 0.9.30 vendored with a one-line teardown fix (vendor/libsql):
# upstream drops the local connection twice (tursodatabase/libsql#2251),
# double-closing the sqlite3 handle. The use-after-free intermittently
# aborts Windows test processes with STATUS_ACCESS_VIOLATION (0xc0000005).
# Drop the patch once an upstream release makes `disconnect` idempotent.
[patch.crates-io]
libsql = { path = "vendor/libsql" }