forked from zeroclaw-labs/zeroclaw
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
379 lines (316 loc) · 14.5 KB
/
Cargo.toml
File metadata and controls
379 lines (316 loc) · 14.5 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
[workspace]
members = [".", "crates/zeroclaw-api", "crates/zeroclaw-infra", "crates/zeroclaw-config", "crates/zeroclaw-providers", "crates/zeroclaw-memory", "crates/zeroclaw-channels", "crates/zeroclaw-tools", "crates/zeroclaw-runtime", "crates/zeroclaw-tui", "crates/zeroclaw-plugins", "crates/zeroclaw-gateway", "crates/zeroclaw-hardware", "crates/zeroclaw-tool-call-parser", "crates/robot-kit", "crates/aardvark-sys", "crates/zeroclaw-macros", "apps/tauri"]
resolver = "2"
[workspace.package]
version = "0.6.9"
edition = "2024"
license = "MIT OR Apache-2.0"
repository = "https://github.com/zeroclaw-labs/zeroclaw"
rust-version = "1.87"
[workspace.dependencies]
zeroclaw-api = { path = "crates/zeroclaw-api", version = "0.6.9" }
zeroclaw-infra = { path = "crates/zeroclaw-infra", version = "0.6.9" }
zeroclaw-config = { path = "crates/zeroclaw-config", version = "0.6.9", default-features = false }
zeroclaw-providers = { path = "crates/zeroclaw-providers", version = "0.6.9" }
zeroclaw-memory = { path = "crates/zeroclaw-memory", version = "0.6.9" }
zeroclaw-channels = { path = "crates/zeroclaw-channels", version = "0.6.9", default-features = false }
zeroclaw-tools = { path = "crates/zeroclaw-tools", version = "0.6.9" }
zeroclaw-runtime = { path = "crates/zeroclaw-runtime", version = "0.6.9", default-features = false }
zeroclaw-tui = { path = "crates/zeroclaw-tui", version = "0.6.9" }
zeroclaw-plugins = { path = "crates/zeroclaw-plugins", version = "0.6.9" }
zeroclaw-gateway = { path = "crates/zeroclaw-gateway", version = "0.6.9" }
zeroclaw-hardware = { path = "crates/zeroclaw-hardware", version = "0.6.9" }
zeroclaw-tool-call-parser = { path = "crates/zeroclaw-tool-call-parser", version = "0.6.9" }
zeroclaw-macros = { path = "crates/zeroclaw-macros", version = "0.6.9" }
aardvark-sys = { path = "crates/aardvark-sys", version = "0.1.0" }
[package]
name = "zeroclawlabs"
version.workspace = true
edition.workspace = true
authors = ["theonlyhennygod"]
license.workspace = true
description = "Zero overhead. Zero compromise. 100% Rust. The fastest, smallest AI assistant."
repository.workspace = true
readme = "README.md"
keywords = ["ai", "agent", "cli", "assistant", "chatbot"]
categories = ["command-line-utilities", "api-bindings"]
rust-version.workspace = true
include = [
"/src/**/*",
"/build.rs",
"/Cargo.toml",
"/Cargo.lock",
"/LICENSE*",
"/README.md",
"/web/dist/**/*",
"/tool_descriptions/**/*",
]
[[bin]]
name = "zeroclaw"
path = "src/main.rs"
[lib]
name = "zeroclaw"
path = "src/lib.rs"
[dependencies]
# Internal workspace crates — versions and paths declared once in [workspace.dependencies]
zeroclaw-api.workspace = true
zeroclaw-infra.workspace = true
zeroclaw-config.workspace = true
zeroclaw-providers.workspace = true
zeroclaw-memory.workspace = true
zeroclaw-channels = { workspace = true, optional = true }
zeroclaw-tools = { workspace = true, optional = true }
zeroclaw-runtime = { workspace = true, optional = true }
zeroclaw-tui = { workspace = true, optional = true }
zeroclaw-plugins = { workspace = true, optional = true }
zeroclaw-gateway = { workspace = true, optional = true }
zeroclaw-hardware = { workspace = true, optional = true }
zeroclaw-tool-call-parser.workspace = true
zeroclaw-macros.workspace = true
# CLI - minimal and fast
clap = { version = "4.5", features = ["derive"] }
clap_complete = "4.5"
# Async runtime - feature-optimized for size
tokio = { version = "1.50", default-features = false, features = ["rt-multi-thread", "macros", "time", "net", "io-util", "sync", "process", "io-std", "fs", "signal"] }
tokio-util = { version = "0.7", default-features = false }
tokio-stream = { version = "0.1.18", default-features = false, features = ["fs", "sync"] }
# HTTP client - minimal features
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls", "blocking", "multipart", "stream", "socks"] }
# Serialization
serde = { version = "1.0", default-features = false, features = ["derive"] }
serde_json = { version = "1.0", default-features = false, features = ["std"] }
# Config
directories = "6.0"
toml = "1.0"
shellexpand = "3.1"
# JSON Schema generation for config export
schemars = "1.2"
# Logging - minimal
tracing = { version = "0.1", default-features = false }
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "ansi", "env-filter"] }
# Base64 encoding (screenshots, image data)
base64 = "0.22"
image = { version = "0.25", default-features = false, features = ["jpeg", "png"] }
# URL encoding for web search
urlencoding = "2.1"
# HTML to plain text conversion (web_fetch tool)
nanohtml2text = "0.2"
rumqttc = "0.24"
# Tarball extraction for binary updates
flate2 = "1"
tar = "0.4"
# Progress bars (update pipeline)
indicatif = "0.18"
# Temp files (update pipeline rollback)
tempfile = "3.26"
# Zip extraction for ClawhHub / OpenClaw registry installers
zip = { version = "8.1", default-features = false, features = ["deflate-flate2"] }
# Error handling
anyhow = "1.0"
thiserror = "2.0"
# Aardvark I2C/SPI/GPIO USB adapter (Total Phase) — stub when SDK absent
aardvark-sys.workspace = true
# UUID generation
uuid = { version = "1.22", default-features = false, features = ["v4", "std"] }
# Authenticated encryption (AEAD) for secret store
chacha20poly1305 = "0.10"
# HMAC for webhook signature verification
hmac = "0.12"
sha2 = "0.10"
hex = "0.4"
# CSPRNG for secure token generation
rand = "0.10"
# Portable atomic fallbacks for targets without native 64-bit atomics
portable-atomic = "1"
# Fast mutexes that don't poison on panic
parking_lot = "0.12"
# Async traits
async-trait = "0.1"
# HMAC-SHA256 (Zhipu/GLM JWT auth)
ring = { version = "0.17", optional = true }
# LRU cache for bounded sender state
lru = { version = "0.16", optional = true }
# Memory / persistence (migration.rs, behind agent-runtime)
rusqlite = { version = "0.37", features = ["bundled"], optional = true }
chrono = { version = "0.4", default-features = false, features = ["clock", "std", "serde"] }
chrono-tz = { version = "0.10", optional = true }
cron = { version = "0.15", optional = true }
# Interactive CLI prompts (memory CLI uses dialoguer unconditionally)
dialoguer = { version = "0.12", features = ["fuzzy-select"] }
console = "0.16"
# TUI onboarding (ratatui + crossterm)
ratatui = { version = "0.30", default-features = true, optional = true }
crossterm = { version = "0.29", features = ["event-stream"], optional = true }
# Hardware discovery (device path globbing)
glob = { version = "0.3", optional = true }
# Nostr key validation for wizard (behind channel-nostr feature)
nostr-sdk = { version = "0.44", default-features = false, optional = true }
# Binary discovery (init system detection)
which = { version = "8.0", optional = true }
# WebSocket client channels (Discord/Lark/DingTalk/Nostr)
tokio-tungstenite = { version = "0.29", features = ["rustls-tls-webpki-roots"], optional = true }
tokio-socks = { version = "0.5", optional = true }
futures-util = { version = "0.3", default-features = false, features = ["sink"] }
regex = "1.10"
hostname = { version = "0.4.2", optional = true }
rustls = { version = "0.23", optional = true }
rustls-pemfile = { version = "2", optional = true }
rustls-pki-types = { version = "1.14.0", optional = true }
tokio-rustls = { version = "0.26.4", optional = true }
webpki-roots = { version = "1.0.6", optional = true }
# email
lettre = { version = "0.11.19", default-features = false, features = ["builder", "smtp-transport", "rustls-tls"], optional = true }
mail-parser = { version = "0.11.2", optional = true }
async-imap = { version = "0.11", features = ["runtime-tokio"], default-features = false, optional = true }
# HTTP server (gateway) — replaces raw TCP for proper HTTP/1.1 compliance
axum = { version = "0.8", default-features = false, features = ["http1", "json", "tokio", "query", "ws", "macros"], optional = true }
hyper = { version = "1", features = ["http1", "server"], optional = true }
hyper-util = { version = "0.1", features = ["tokio", "server-auto", "server-graceful"], optional = true }
tower = { version = "0.5", default-features = false, features = ["util"], optional = true }
tower-http = { version = "0.6", default-features = false, features = ["limit", "timeout"], optional = true }
http-body-util = { version = "0.1", optional = true }
# rust-embed removed — web dashboard served from filesystem via gateway.web_dist_dir
mime_guess = { version = "2", optional = true }
# Use the blocking HTTP exporter client to avoid Tokio-reactor panics in
# non-Tokio contexts.
# (Linux, macOS, Windows). Android/Termux uses target_os="android" and is excluded.
# Uses wa-rs for Bot and Client, wa-rs-core for storage traits, custom rusqlite backend avoids Diesel conflict.
# Unix-specific dependencies (for root check, etc.)
[target.'cfg(unix)'.dependencies]
libc = "0.2"
[features]
default = [
"agent-runtime",
"observability-prometheus",
"schema-export",
]
# The full agent runtime — agent loop, channels, tools, gateway, TUI, all subsystems.
# Without this, you get the kernel: config + providers + memory + CLI chat.
agent-runtime = [
"dep:zeroclaw-runtime", "dep:zeroclaw-channels", "dep:zeroclaw-tools",
"dep:rusqlite",
"dep:ring", "dep:lru", "dep:chrono-tz", "dep:cron", "dep:glob", "dep:which",
"dep:ratatui", "dep:crossterm",
"dep:tokio-tungstenite", "dep:tokio-socks", "dep:hostname",
"dep:rustls", "dep:rustls-pemfile", "dep:rustls-pki-types", "dep:tokio-rustls", "dep:webpki-roots",
"dep:lettre", "dep:mail-parser", "dep:async-imap",
"dep:axum", "dep:hyper", "dep:hyper-util", "dep:tower", "dep:tower-http", "dep:http-body-util",
"dep:mime_guess",
"gateway", "tui-onboarding",
"channel-email", "channel-telegram", "channel-lark",
"channel-discord", "channel-slack", "channel-signal",
"channel-mattermost", "channel-irc", "channel-imessage",
"channel-dingtalk", "channel-qq", "channel-bluesky",
"channel-twitter", "channel-reddit", "channel-notion",
"channel-linq", "channel-wati", "channel-nextcloud",
"channel-mochat", "channel-wecom", "channel-clawdtalk",
"channel-webhook", "channel-acp-server", "channel-whatsapp-cloud",
"channel-voice-call",
]
# Major subsystems — each forwards to exactly ONE crate
gateway = ["dep:zeroclaw-gateway"]
tui-onboarding = ["dep:zeroclaw-tui"]
schema-export = ["zeroclaw-config/schema-export"]
# Channels — each forwards directly to zeroclaw-channels (1 hop)
channel-email = ["zeroclaw-channels/channel-email"]
channel-telegram = ["zeroclaw-channels/channel-telegram"]
channel-lark = ["zeroclaw-channels/channel-lark"]
channel-nostr = ["zeroclaw-channels/channel-nostr", "zeroclaw-runtime/channel-nostr", "dep:nostr-sdk"]
channel-matrix = ["zeroclaw-channels/channel-matrix"]
channel-discord = ["zeroclaw-channels/channel-discord"]
channel-slack = ["zeroclaw-channels/channel-slack"]
channel-signal = ["zeroclaw-channels/channel-signal"]
channel-mattermost = ["zeroclaw-channels/channel-mattermost"]
channel-irc = ["zeroclaw-channels/channel-irc"]
channel-imessage = ["zeroclaw-channels/channel-imessage"]
channel-dingtalk = ["zeroclaw-channels/channel-dingtalk"]
channel-qq = ["zeroclaw-channels/channel-qq"]
channel-bluesky = ["zeroclaw-channels/channel-bluesky"]
channel-twitter = ["zeroclaw-channels/channel-twitter"]
channel-reddit = ["zeroclaw-channels/channel-reddit"]
channel-notion = ["zeroclaw-channels/channel-notion"]
channel-linq = ["zeroclaw-channels/channel-linq"]
channel-wati = ["zeroclaw-channels/channel-wati"]
channel-nextcloud = ["zeroclaw-channels/channel-nextcloud"]
channel-mochat = ["zeroclaw-channels/channel-mochat"]
channel-wecom = ["zeroclaw-channels/channel-wecom"]
channel-clawdtalk = ["zeroclaw-channels/channel-clawdtalk"]
channel-webhook = ["zeroclaw-channels/channel-webhook"]
channel-acp-server = ["zeroclaw-channels/channel-acp-server"]
channel-whatsapp-cloud = ["zeroclaw-channels/channel-whatsapp-cloud"]
channel-voice-call = ["zeroclaw-channels/channel-voice-call"]
channel-feishu = ["channel-lark"]
whatsapp-web = ["zeroclaw-channels/whatsapp-web"]
voice-wake = ["zeroclaw-channels/voice-wake"]
# Backends and platform flags — each forwards to ONE crate
observability-prometheus = ["zeroclaw-runtime/observability-prometheus"]
observability-otel = ["zeroclaw-runtime/observability-otel"]
hardware = ["dep:zeroclaw-hardware", "zeroclaw-hardware/hardware"]
peripheral-rpi = ["dep:zeroclaw-hardware", "zeroclaw-hardware/peripheral-rpi"]
sandbox-landlock = ["zeroclaw-runtime/sandbox-landlock"]
sandbox-bubblewrap = ["zeroclaw-runtime/sandbox-bubblewrap"]
browser-native = ["zeroclaw-tools/browser-native"]
plugins-wasm = ["dep:zeroclaw-plugins", "zeroclaw-runtime/plugins-wasm"]
probe = ["dep:zeroclaw-hardware", "zeroclaw-hardware/probe"]
rag-pdf = ["zeroclaw-tools/rag-pdf"]
webauthn = ["zeroclaw-runtime/webauthn"]
# Backward-compatible aliases
fantoccini = ["browser-native"]
landlock = ["sandbox-landlock"]
metrics = ["observability-prometheus"]
# CI meta-feature
ci-all = [
"agent-runtime",
"channel-nostr", "channel-matrix", "whatsapp-web",
"observability-prometheus", "observability-otel",
"hardware", "peripheral-rpi",
"sandbox-landlock", "sandbox-bubblewrap",
"browser-native", "plugins-wasm", "probe", "rag-pdf",
"webauthn",
]
[profile.dev]
incremental = true
opt-level = 0
[profile.release]
opt-level = "z" # Optimize for size
lto = "fat" # Maximum cross-crate optimization for smaller binaries
codegen-units = 1 # Serialized codegen for low-memory devices (e.g., Raspberry Pi 3 with 1GB RAM)
# Higher values (e.g., 8) compile faster but require more RAM during compilation
strip = true # Remove debug symbols
panic = "abort" # Reduce binary size
[profile.release-fast]
inherits = "release"
codegen-units = 8 # Parallel codegen for faster builds on powerful machines (16GB+ RAM recommended)
# Use: cargo build --profile release-fast
[profile.ci]
inherits = "release"
lto = "thin" # Much faster than fat LTO; still catches release-mode issues
codegen-units = 16 # Full parallelism for CI runners
[profile.dist]
inherits = "release"
opt-level = "z"
lto = "fat"
codegen-units = 1
strip = true
panic = "abort"
[dev-dependencies]
tempfile = "3.26"
criterion = { version = "0.8", features = ["async_tokio"] }
wiremock = "0.6"
scopeguard = "1.2"
rcgen = "0.13"
[[test]]
name = "component"
path = "tests/test_component.rs"
[[test]]
name = "integration"
path = "tests/test_integration.rs"
[[test]]
name = "system"
path = "tests/test_system.rs"
[[test]]
name = "live"
path = "tests/test_live.rs"
[[bench]]
name = "agent_benchmarks"
harness = false