Skip to content

Commit 200a177

Browse files
ArgenisDLRclaude
andcommitted
perf(deps): make prometheus and TUI onboarding opt-in, not default
Move observability-prometheus out of default features and tui-onboarding out of agent-runtime. Both remain available via explicit --features flags and are included in ci-all. - Removes observability-prometheus from root and runtime default features - Removes tui-onboarding and dep:ratatui/dep:crossterm from agent-runtime - Adds tui-onboarding to ci-all for full CI coverage - Moves run_tui_if_enabled fallback before test module (fixes clippy) Binary size (default features): 13,323,664 → 13,090,384 (~228KB / 12MB). First time below 13MB on default features. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent caf2412 commit 200a177

3 files changed

Lines changed: 9 additions & 11 deletions

File tree

Cargo.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ libc = "0.2"
227227
[features]
228228
default = [
229229
"agent-runtime",
230-
"observability-prometheus",
231230
"schema-export",
232231
]
233232

@@ -237,13 +236,12 @@ agent-runtime = [
237236
"dep:zeroclaw-runtime", "dep:zeroclaw-channels", "dep:zeroclaw-tools",
238237
"dep:rusqlite",
239238
"dep:ring", "dep:lru", "dep:chrono-tz", "dep:cron", "dep:glob", "dep:which",
240-
"dep:ratatui", "dep:crossterm",
241239
"dep:tokio-tungstenite", "dep:tokio-socks", "dep:hostname",
242240
"dep:rustls", "dep:rustls-pemfile", "dep:rustls-pki-types", "dep:tokio-rustls", "dep:webpki-roots",
243241
"dep:lettre", "dep:mail-parser", "dep:async-imap",
244242
"dep:axum", "dep:hyper", "dep:hyper-util", "dep:tower", "dep:tower-http", "dep:http-body-util",
245243
"dep:mime_guess",
246-
"gateway", "tui-onboarding",
244+
"gateway",
247245
"channel-email", "channel-telegram", "channel-lark",
248246
"channel-discord", "channel-slack", "channel-signal",
249247
"channel-mattermost", "channel-irc", "channel-imessage",
@@ -312,7 +310,7 @@ metrics = ["observability-prometheus"]
312310

313311
# CI meta-feature
314312
ci-all = [
315-
"agent-runtime",
313+
"agent-runtime", "tui-onboarding",
316314
"channel-nostr", "channel-matrix", "whatsapp-web",
317315
"observability-prometheus", "observability-otel",
318316
"hardware", "peripheral-rpi",

crates/zeroclaw-runtime/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ libc = "0.2"
8787
pdf-extract = { version = "0.10", optional = true }
8888

8989
[features]
90-
default = ["observability-prometheus", "schema-export"]
90+
default = ["schema-export"]
9191
observability-prometheus = ["dep:prometheus"]
9292
observability-otel = ["dep:opentelemetry", "dep:opentelemetry_sdk", "dep:opentelemetry-otlp"]
9393
sandbox-landlock = ["dep:landlock"]

src/main.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3311,6 +3311,12 @@ async fn run_tui_if_enabled() -> anyhow::Result<()> {
33113311
Box::pin(tui::run_tui_onboarding()).await
33123312
}
33133313

3314+
#[cfg(not(feature = "tui-onboarding"))]
3315+
#[allow(clippy::unused_async)]
3316+
async fn run_tui_if_enabled() -> anyhow::Result<()> {
3317+
anyhow::bail!("TUI onboarding feature is not enabled. Rebuild with --features tui-onboarding")
3318+
}
3319+
33143320
#[cfg(test)]
33153321
mod tests {
33163322
use super::*;
@@ -3564,9 +3570,3 @@ mod tests {
35643570
assert!((final_temperature - 0.7).abs() < f64::EPSILON);
35653571
}
35663572
}
3567-
3568-
#[cfg(not(feature = "tui-onboarding"))]
3569-
#[allow(clippy::unused_async)]
3570-
async fn run_tui_if_enabled() -> anyhow::Result<()> {
3571-
anyhow::bail!("TUI onboarding feature is not enabled. Rebuild with --features tui-onboarding")
3572-
}

0 commit comments

Comments
 (0)