-
Notifications
You must be signed in to change notification settings - Fork 165
Expand file tree
/
Copy pathCargo.toml
More file actions
221 lines (191 loc) · 6.42 KB
/
Cargo.toml
File metadata and controls
221 lines (191 loc) · 6.42 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
[package]
name = "jcode"
version = "0.11.4"
description = "Possibly the greatest coding agent ever built — blazing-fast TUI, multi-model, swarm coordination, 30+ tools"
edition = "2024"
[workspace]
members = [
".",
"crates/jcode-agent-runtime",
"crates/jcode-ambient-types",
"crates/jcode-auth-types",
"crates/jcode-embedding",
"crates/jcode-gateway-types",
"crates/jcode-pdf",
"crates/jcode-background-types",
"crates/jcode-batch-types",
"crates/jcode-config-types",
"crates/jcode-core",
"crates/jcode-memory-types",
"crates/jcode-message-types",
"crates/jcode-plan",
"crates/jcode-protocol",
"crates/jcode-selfdev-types",
"crates/jcode-session-types",
"crates/jcode-side-panel-types",
"crates/jcode-azure-auth",
"crates/jcode-notify-email",
"crates/jcode-provider-metadata",
"crates/jcode-provider-core",
"crates/jcode-provider-openrouter",
"crates/jcode-provider-gemini",
"crates/jcode-tui-markdown",
"crates/jcode-usage-types",
"crates/jcode-tui-core",
"crates/jcode-tui-mermaid",
"crates/jcode-task-types",
"crates/jcode-tui-render",
"crates/jcode-terminal-launch",
"crates/jcode-tui-workspace",
"crates/jcode-mobile-core",
"crates/jcode-mobile-sim",
"crates/jcode-desktop",
]
[lib]
name = "jcode"
path = "src/lib.rs"
[[bin]]
name = "jcode"
path = "src/main.rs"
[[bin]]
name = "test_api"
path = "src/bin/test_api.rs"
[[bin]]
name = "jcode-harness"
path = "src/bin/harness.rs"
[dependencies]
# Memory allocator (reduces fragmentation for long-running server)
tikv-jemallocator = { version = "0.6", features = ["unprefixed_malloc_on_supported_platforms"], optional = true }
tikv-jemalloc-ctl = { version = "0.6", optional = true }
tikv-jemalloc-sys = { version = "0.6", optional = true }
# Async runtime
tokio = { version = "1", features = ["full", "process"] }
futures = "0.3"
async-trait = "0.1"
# HTTP client
reqwest = { version = "0.12", features = ["json", "stream", "blocking"] }
tokio-tungstenite = { version = "0.24", default-features = false, features = ["connect", "rustls-tls-native-roots"] }
# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_yaml = "0.9"
toml = "0.8"
# CLI
clap = { version = "4", features = ["derive"] }
# File operations
glob = "0.3"
ignore = "0.4" # gitignore-aware file walking
walkdir = "2"
similar = "2" # diffing for edits
# Utilities
dirs = "5" # home directory
anyhow = "1"
thiserror = "1"
libc = "0.2" # Unix system calls (flock)
chrono = { version = "0.4", features = ["serde"] }
regex = "1"
urlencoding = "2" # URL encoding for web search
uuid = { version = "1", features = ["v4", "v5"] }
proctitle = "0.1"
# Embeddings (local inference) - behind feature flag (163 crates, slow to compile)
jcode-embedding = { path = "crates/jcode-embedding", optional = true }
jcode-gateway-types = { path = "crates/jcode-gateway-types" }
# OAuth
base64 = "0.22"
sha2 = "0.10"
rand = "0.9.3"
hex = "0.4"
url = "2"
open = "5" # Open URLs in browser
jcode-auth-types = { path = "crates/jcode-auth-types" }
jcode-azure-auth = { path = "crates/jcode-azure-auth" }
jcode-agent-runtime = { path = "crates/jcode-agent-runtime" }
jcode-ambient-types = { path = "crates/jcode-ambient-types" }
jcode-notify-email = { path = "crates/jcode-notify-email" }
jcode-provider-metadata = { path = "crates/jcode-provider-metadata" }
jcode-provider-core = { path = "crates/jcode-provider-core" }
jcode-provider-openrouter = { path = "crates/jcode-provider-openrouter" }
jcode-provider-gemini = { path = "crates/jcode-provider-gemini" }
jcode-tui-markdown = { path = "crates/jcode-tui-markdown" }
jcode-tui-core = { path = "crates/jcode-tui-core" }
jcode-tui-mermaid = { path = "crates/jcode-tui-mermaid" }
jcode-tui-render = { path = "crates/jcode-tui-render" }
jcode-terminal-launch = { path = "crates/jcode-terminal-launch" }
jcode-tui-workspace = { path = "crates/jcode-tui-workspace" }
jcode-usage-types = { path = "crates/jcode-usage-types" }
# Streaming
tokio-stream = "0.1"
bytes = "1"
# TUI
ratatui = "0.30"
crossterm = { version = "0.28", features = ["event-stream"] }
arboard = "3" # Clipboard support
image = { version = "0.25", default-features = false, features = ["png", "jpeg"] } # Only PNG/JPEG (skip avif/rav1e, exr, gif, tiff, etc)
# Markdown & syntax highlighting
unicode-width = "0.2" # Unicode character display width
# PDF parsing (behind feature flag)
jcode-pdf = { path = "crates/jcode-pdf", optional = true }
jcode-background-types = { path = "crates/jcode-background-types" }
jcode-batch-types = { path = "crates/jcode-batch-types" }
jcode-config-types = { path = "crates/jcode-config-types" }
jcode-core = { path = "crates/jcode-core" }
jcode-memory-types = { path = "crates/jcode-memory-types" }
jcode-message-types = { path = "crates/jcode-message-types" }
jcode-plan = { path = "crates/jcode-plan" }
jcode-protocol = { path = "crates/jcode-protocol" }
jcode-selfdev-types = { path = "crates/jcode-selfdev-types" }
jcode-session-types = { path = "crates/jcode-session-types" }
jcode-task-types = { path = "crates/jcode-task-types" }
jcode-side-panel-types = { path = "crates/jcode-side-panel-types" }
# Archive extraction (for auto-update)
flate2 = "1"
tar = "0.4"
tempfile = "3"
agentgrep = { git = "https://github.com/1jehuang/agentgrep.git", tag = "v0.1.2" }
qr2term = "0.3.3"
[features]
default = ["embeddings", "pdf"]
jemalloc = [
"dep:tikv-jemallocator",
"dep:tikv-jemalloc-ctl",
"dep:tikv-jemalloc-sys",
"tikv-jemallocator/stats",
"tikv-jemalloc-ctl/stats",
]
jemalloc-prof = [
"jemalloc",
"tikv-jemallocator/profiling",
"tikv-jemalloc-ctl/profiling",
]
embeddings = ["dep:jcode-embedding"]
pdf = ["dep:jcode-pdf"]
[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.59", features = ["Win32_Foundation", "Win32_System_Threading"] }
[target.'cfg(target_os = "macos")'.dependencies]
global-hotkey = "0.7"
[profile.release]
opt-level = 1
debug = 0
codegen-units = 256
incremental = true
[profile.selfdev]
inherits = "release"
opt-level = 0
# Full LTO release for stable/distribution builds
[profile.release-lto]
inherits = "release"
lto = "thin"
codegen-units = 16
incremental = false
[profile.dev]
debug = 0
incremental = true
[profile.dev.package."*"]
opt-level = 0
[profile.test]
debug = 0
incremental = true
codegen-units = 256
[dev-dependencies]
async-stream = "0.3"
[build-dependencies]