forked from xai-org/grok-build
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
402 lines (389 loc) · 15.2 KB
/
Copy pathCargo.toml
File metadata and controls
402 lines (389 loc) · 15.2 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
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
# Auto-generated workspace root. Prefer editing per-crate Cargo.toml files.
[workspace]
resolver = "2"
members = [
"crates/build/xai-proto-build",
"crates/codegen/ptyctl",
"crates/codegen/ptyctl-cli",
"crates/codegen/xai-acp-lib",
"crates/codegen/xai-agent-lifecycle",
"crates/codegen/xai-chat-state",
"crates/codegen/xai-codebase-graph",
"crates/codegen/xai-crash-handler",
"crates/codegen/xai-fast-worktree",
"crates/codegen/xai-file-utils",
"crates/codegen/xai-fsnotify",
"crates/codegen/xai-gix-status",
"crates/codegen/xai-grok-agent",
"crates/codegen/xai-grok-announcements",
"crates/codegen/xai-grok-auth",
"crates/codegen/xai-grok-config",
"crates/codegen/xai-grok-config-types",
"crates/codegen/xai-grok-env",
"crates/codegen/xai-grok-hooks",
"crates/codegen/xai-grok-http",
"crates/codegen/xai-grok-markdown",
"crates/codegen/xai-grok-markdown-core",
"crates/codegen/xai-grok-mcp",
"crates/codegen/xai-grok-memory",
"crates/codegen/xai-grok-mermaid",
"crates/codegen/xai-grok-models",
"crates/codegen/xai-grok-pager",
"crates/codegen/xai-grok-pager-bin",
"crates/codegen/xai-grok-pager-minimal",
"crates/codegen/xai-grok-pager-pty-harness",
"crates/codegen/xai-grok-pager-render",
"crates/codegen/xai-grok-paths",
"crates/codegen/xai-grok-plugin-marketplace",
"crates/codegen/xai-grok-sampler",
"crates/codegen/xai-grok-sampling-types",
"crates/codegen/xai-grok-sandbox",
"crates/codegen/xai-grok-secrets",
"crates/codegen/xai-grok-shared",
"crates/codegen/xai-grok-shell",
"crates/codegen/xai-grok-shell-base",
"crates/codegen/xai-grok-shell-session-support",
"crates/codegen/xai-grok-subagent-resolution",
"crates/codegen/xai-grok-telemetry",
"crates/codegen/xai-grok-test-support",
"crates/codegen/xai-grok-tools",
"crates/codegen/xai-grok-tools-api",
"crates/codegen/xai-grok-update",
"crates/codegen/xai-grok-version",
"crates/codegen/xai-grok-voice",
"crates/codegen/xai-grok-workspace",
"crates/codegen/xai-grok-workspace-client",
"crates/codegen/xai-grok-workspace-types",
"crates/codegen/xai-hooks-plugins-types",
"crates/codegen/xai-hunk-tracker",
"crates/codegen/xai-mixpanel",
"crates/codegen/xai-prompt-queue",
"crates/codegen/xai-ratatui-inline",
"crates/codegen/xai-ratatui-textarea",
"crates/codegen/xai-sqlite-journal",
"crates/codegen/xai-system-power",
"crates/codegen/xai-token-estimation",
"crates/codegen/xai-tracing-macros",
"crates/codegen/xai-tty-utils",
"crates/common/xai-circuit-breaker",
"crates/common/xai-computer-hub-core",
"crates/common/xai-computer-hub-mcp-adapter",
"crates/common/xai-computer-hub-sdk",
"crates/common/xai-grok-compaction",
"crates/common/xai-interjection-core",
"crates/common/xai-test-utils",
"crates/common/xai-tool-protocol",
"crates/common/xai-tool-runtime",
"crates/common/xai-tool-types",
"crates/common/xai-tracing",
"prod/mc/cli-chat-proxy-types",
"third_party/dagre_rust",
"third_party/graphlib_rust",
"third_party/mermaid-to-svg",
"third_party/ordered_hashmap",
]
[workspace.package]
edition = "2024"
license = "Apache-2.0"
[workspace.dependencies]
agent-client-protocol = { version = "0.10.4", features = ["unstable"] }
alacritty_terminal = "0.26.0"
ansi-to-tui = "7.0.0"
ansi-width = "0.1"
anstyle = "1.0"
anstyle-lossy = "1.1.4"
anstyle-parse = "0.2"
anstyle-syntect = "1.0.4"
anyhow = { version = "1", features = ["backtrace"] }
arboard = "3.6"
arc-swap = "1.7"
assert_matches = "1.5.0"
async-compression = { version = "0.4.17", default-features = false, features = ["gzip", "zstd", "tokio"] }
async-lsp = { version = "0.2.3", features = ["tokio", "tracing"] }
async-openai = { version = "0.33.0", features = ["responses"] }
async-stream = "0.3"
async-trait = "0.1"
axum = { version = "0.8", features = ["macros", "ws"] }
backon = { version = "1.6" }
backtrace = "0.3"
base64 = "0.22"
blake3 = "1"
bytes = { version = "1", features = ["serde"] }
camino = "1.1.10"
chrono = "0.4"
clap = { version = "4", features = ["derive", "env"] }
clap_complete = { version = "4" }
colored_json = "5"
core-foundation = "0.10"
crc32fast = "1.4"
criterion = "0.6"
crossbeam = "0.8"
crossterm = "0.28"
cryptify = "3.2"
dashmap = "6"
derive_more = { version = "2", features = ["add", "add_assign", "debug", "deref", "deref_mut", "display", "from", "from_str", "into", "into_iterator", "try_into"] }
dirs = "5.0"
documented = "0.9"
dunce = "1"
educe = "0.6.0"
enum_delegate = "0.2"
env_logger = "0.11"
eventsource-stream = "0.2"
fastrace = { version = "0.7" }
fastrace-opentelemetry = { version = "0.18" }
fastrace-reqwest = { version = "0.2" }
fastrace-tonic = { version = "0.1" }
fastrand = "2"
filetime = "0.2.25"
flate2 = { version = "1", default-features = false, features = ["zlib-rs"] }
fontdb = "0.23"
fs2 = "0.4"
futures = "0.3"
futures-util = "0.3"
fuzzy-matcher = "0.3.7"
gcloud-storage = { version = "1.3.0", default-features = false, features = ["auth", "jwt-aws-lc-rs", "external-account"] }
gethostname = "1"
gix = { version = "0.83", default-features = false, features = ["sha1"] }
glob = "0.3"
globset = "0.4"
htmd = "0.5.4"
html-escape = "0.2"
http = "1"
http-body-util = "0.1"
humantime-serde = "1"
ignore = "0.4"
image = { version = "0.25.9", default-features = false }
indexmap = { version = "2", features = ["serde"] }
indicatif = "0.18"
infer = "0.19.0"
insta = "1"
itertools = "0.14"
jsonschema = "0.30.0"
libc = "0.2"
linkify = "0.10"
lipsum = "0.9"
log = { version = "0.4", features = ["kv", "kv_unstable"] }
md5 = "0.8"
mermaid-to-svg = { path = "third_party/mermaid-to-svg" }
minijinja = "2.9"
mockito = "1"
moka = "0.12"
nix = { version = "0.30", features = ["poll", "process", "signal", "sched", "term", "mount", "fs", "ioctl", "mman", "reboot", "user"] }
notify = "8"
notify-debouncer-mini = "0.6"
nucleo = { git = "https://github.com/helix-editor/nucleo.git", rev = "5b74652" }
num_cpus = "1"
oauth2 = "5"
obfstr = "0.4"
once_cell = "1"
opentelemetry = "0.32"
opentelemetry-http = { version = "0.32", features = ["reqwest-blocking"] }
opentelemetry-otlp = { version = "0.32", features = ["grpc-tonic", "reqwest-blocking-client", "tls-roots"] }
opentelemetry-proto = { version = "0.32", features = ["gen-tonic"] }
opentelemetry_sdk = { version = "0.32.1", features = ["spec_unstable_metrics_views"] }
parking_lot = "0.12.4"
pbjson-build = "0.9"
pdf_oxide = { version = "0.3.43", features = ["rendering"] }
petgraph = { version = "0.6.5", default-features = false, features = ["serde-1", "stable_graph"] }
portable-pty = "0.9"
pprof = "0.15"
pretty_assertions = "1"
prometheus = { version = "0.14", features = ["process"] }
prost = "0.14"
prost-build = "0.14"
pulldown-cmark = "0.13"
quick-xml = "0.38"
rand = "0.9"
ratatui = { version = "0.29" }
ratatui-core = "0.1"
rayon = "1"
reflink-copy = "0.1"
regex = "1"
reqwest = { version = "0.12", features = ["rustls-tls", "stream", "json", "multipart", "http2", "blocking", "socks"], default-features = false }
reqwest-middleware = { version = "0.4.1", features = ["json", "multipart"] }
resvg = { version = "0.47", default-features = false, features = ["text"] }
ring = "0.17"
rsa = "0.9"
runfiles = "0.1"
rustc-hash = "2"
schemars = "1"
scraper = "0.23"
semver = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_path_to_error = "0.1"
serde_yaml = "0.9"
serial_test = "3"
sha2 = { version = "0.10", features = ["force-soft"] }
shlex = "1"
signal-hook = "0.3"
similar = "2.7"
siphasher = "1"
smallvec = "1"
strip-ansi-escapes = "0.2.1"
strum = { version = "0.27", features = ["derive"] }
supports-color = "3.0"
syntect = "5.3"
tar = "0.4"
tempfile = "3"
terminput = "0.3"
termwiz = { version = "0.23", default-features = false }
textwrap = "0.16"
thiserror = "2"
tikv-jemalloc-ctl = "0.6"
tikv-jemalloc-sys = "0.6"
tikv-jemallocator = { version = "0.6", features = ["profiling", "unprefixed_malloc_on_supported_platforms"] }
time = "0.3"
tiny-skia = "0.12"
tokio = { version = "1", features = ["full"] }
tokio-retry = "0.3"
tokio-stream = "0.1"
tokio-tungstenite = "0.27"
tokio-util = { version = "0.7", features = ["rt"] }
toml = "0.9"
toml_edit = "0.22"
tonic = { version = "0.14", features = ["tls-aws-lc", "gzip", "deflate", "zstd"] }
tonic-prost = "0.14"
tonic-prost-build = "0.14"
tower = "0.5"
tower-http = "0.6"
tracing = "0.1"
tracing-opentelemetry = "0.33"
tracing-subscriber = { version = "0.3.23", default-features = false, features = ["env-filter", "smallvec", "tracing-log", "std", "ansi"] }
ts-rs = "12.0"
tui-scrollbar = "0.2"
two-face = { version = "0.4", default-features = false, features = ["syntect-fancy"] }
unicode-segmentation = "1.12.0"
unicode-width = "0.2"
url = "2"
urlencoding = "2"
uuid = { version = "1", features = ["serde", "v4", "v5"] }
vte = "0.15.0"
wait-timeout = "0.2"
walkdir = "2"
webbrowser = { version = "1.0.4" }
which = "8"
whoami = "1.4"
windows = { version = "0.61", features = ["Win32_Security", "Win32_Security_Authorization", "Win32_Foundation", "Win32_System_Threading", "Win32_System_JobObjects", "Win32_System_Console", "Win32_System_Pipes"] }
wiremock = "0.6"
wl-clipboard-rs = "0.9"
xai-acp-lib = { path = "crates/codegen/xai-acp-lib" }
xai-agent-lifecycle = { path = "crates/codegen/xai-agent-lifecycle" }
xai-circuit-breaker = { path = "crates/common/xai-circuit-breaker" }
xai-computer-hub-core = { path = "crates/common/xai-computer-hub-core" }
xai-computer-hub-sdk = { path = "crates/common/xai-computer-hub-sdk" }
xai-gix-status = { path = "crates/codegen/xai-gix-status" }
xai-grok-agent = { path = "crates/codegen/xai-grok-agent" }
xai-grok-announcements = { path = "crates/codegen/xai-grok-announcements" }
xai-grok-auth = { path = "crates/codegen/xai-grok-auth" }
xai-grok-config = { path = "crates/codegen/xai-grok-config" }
xai-grok-config-types = { path = "crates/codegen/xai-grok-config-types" }
xai-grok-env = { path = "crates/codegen/xai-grok-env" }
xai-grok-http = { path = "crates/codegen/xai-grok-http" }
xai-grok-markdown = { path = "crates/codegen/xai-grok-markdown" }
xai-grok-markdown-core = { path = "crates/codegen/xai-grok-markdown-core" }
xai-grok-mcp = { path = "crates/codegen/xai-grok-mcp" }
xai-grok-memory = { path = "crates/codegen/xai-grok-memory" }
xai-grok-mermaid = { path = "crates/codegen/xai-grok-mermaid" }
xai-grok-models = { path = "crates/codegen/xai-grok-models" }
xai-grok-sampler = { path = "crates/codegen/xai-grok-sampler" }
xai-grok-secrets = { path = "crates/codegen/xai-grok-secrets" }
xai-grok-shared = { path = "crates/codegen/xai-grok-shared" }
xai-grok-shell = { path = "crates/codegen/xai-grok-shell" }
xai-grok-shell-base = { path = "crates/codegen/xai-grok-shell-base" }
xai-grok-shell-session-support = { path = "crates/codegen/xai-grok-shell-session-support" }
xai-grok-telemetry = { path = "crates/codegen/xai-grok-telemetry" }
xai-grok-test-support = { path = "crates/codegen/xai-grok-test-support" }
xai-grok-tools = { path = "crates/codegen/xai-grok-tools" }
xai-grok-tools-api = { path = "crates/codegen/xai-grok-tools-api" }
xai-grok-version = { path = "crates/codegen/xai-grok-version" }
xai-grok-workspace = { path = "crates/codegen/xai-grok-workspace" }
xai-grok-workspace-types = { path = "crates/codegen/xai-grok-workspace-types" }
xai-hooks-plugins-types = { path = "crates/codegen/xai-hooks-plugins-types" }
xai-interjection-core = { path = "crates/common/xai-interjection-core" }
xai-mixpanel = { path = "crates/codegen/xai-mixpanel" }
xai-prompt-queue = { path = "crates/codegen/xai-prompt-queue" }
xai-proto-build = { path = "crates/build/xai-proto-build" }
xai-ratatui-inline = { path = "crates/codegen/xai-ratatui-inline" }
xai-ratatui-textarea = { path = "crates/codegen/xai-ratatui-textarea" }
xai-sqlite-journal = { path = "crates/codegen/xai-sqlite-journal" }
xai-system-power = { path = "crates/codegen/xai-system-power" }
xai-test-utils = { path = "crates/common/xai-test-utils" }
xai-token-estimation = { path = "crates/codegen/xai-token-estimation" }
xai-tool-protocol = { path = "crates/common/xai-tool-protocol" }
xai-tool-runtime = { path = "crates/common/xai-tool-runtime" }
xai-tool-types = { path = "crates/common/xai-tool-types" }
xai-tracing = { path = "crates/common/xai-tracing" }
xai-tty-utils = { path = "crates/codegen/xai-tty-utils" }
zbus = { version = "5" }
zstd = "0.13"
[profile.release]
incremental = true
panic = "abort"
# Hardened release profile for shipping to end users (alpha + stable).
# Use `cargo build --profile release-dist` for distribution builds.
# Not used by default `--release` to avoid slowing down local dev builds (~2.2x).
#
# Hardening: thin LTO for cross-crate optimization with reasonable link times,
# codegen-units=1 maximizes optimization (whole-program analysis, no CGU boundaries).
# debug=1 emits line-tables DWARF; strip=false keeps symbols so CI can extract
# .debug sidecars (Linux) or .dSYM bundles (macOS) before stripping post-build.
# Linker flags (RELRO, NX stack) are set per-target in .cargo/config.toml.
[profile.release-dist]
inherits = "release"
lto = "thin"
codegen-units = 1
strip = false
debug = 1
split-debuginfo = "off"
# Production profile for latency-sensitive x-product services (VF, home-mixer).
# Thin LTO gives ~90% of full LTO benefit at significantly faster link time.
# Keeps symbols + line tables for prod debuggability (perf, flamegraph, stack traces).
[profile.x-prod]
inherits = "release"
lto = "thin"
strip = false
codegen-units = 1
debug = "line-tables-only"
panic = "unwind"
# Desktop release profile. Functionally identical to release-dist — kept as a
# named alias so the desktop workflow can reference it without coupling to the
# CLI pipeline's profile name. Alpha and stable share a single release-dist
# profile so that stable promotion can pointer-swap the alpha binary without
# rebuilding.
[profile.release-dist-jemalloc]
inherits = "release-dist"
# All settings now match the parent — this is an intentional alias.
[profile.dev]
panic = "abort"
split-debuginfo = "unpacked"
codegen-units = 128
debug = "line-tables-only"
opt-level = 0
lto = false
incremental = true
[profile.bench]
debug = true
[workspace.lints.clippy]
# prost 0.14 renders proto doc-comment bullet lists in a way that trips this
# lint on generated code. Kept in sync with bazel/lint/linters.bzl.
doc_lazy_continuation = "allow"
doc_overindented_list_items = "allow"
needless_lifetimes = "allow"
single_range_in_vec_init = "allow"
too_many_arguments = "allow"
# Allow uninlined_format_args lint to prevent main from breaking after merges
# When older branches (created before this lint was added to CI) get merged,
# they pass their own CI because their CI config doesn't include this lint check.
# However, once merged to main, the code violates main's lint rules, causing:
# 1. Main's CI to fail
# 2. All new branches based off main to fail CI
# 3. Developers having to fix lint violations from other people's merged code
# Without a merge-queue that runs main's CI checks on the PR branch,
# these violations slip through and break the build for everyone.
# TODO: -> "deny" once/if merge queue enabled
uninlined_format_args = "allow"
# The `fastrace::trace(properties = { … })` proc-macro expands `"{param}"`
# into `format!("{}", param)`, which clippy flags as useless_format.
# Suppressed until the upstream crate fixes its codegen (fixed in 0.7.16+).
useless_format = "allow"