Skip to content

reduce release binary size by 58%#852

Merged
bug-ops merged 1 commit intomainfrom
chore/reduce-binary-size
Feb 25, 2026
Merged

reduce release binary size by 58%#852
bug-ops merged 1 commit intomainfrom
chore/reduce-binary-size

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Feb 25, 2026

Summary

  • Set opt-level = "z" and panic = "abort" in release profile to reduce binary size from 28.8 MiB to 12 MiB
  • Remove unused dev-dependencies: tokio-stream (root crate), tempfile (zeph-scheduler)

Analysis

Binary size breakdown by crate (cargo-bloat) identified major contributors: std (2.2M), reqwest (782K), aws_lc_sys (673K), teloxide_core (602K), rustls (495K), h2 (456K). The reqwest 0.12/0.13 duplication and ring/aws-lc-rs coexistence are caused by upstream dependencies (ollama-rs, teloxide) that haven't migrated to reqwest 0.13 yet — these cannot be resolved without upstream changes.

Test plan

  • cargo +nightly fmt --check
  • cargo clippy --workspace -- -D warnings
  • cargo nextest run --workspace --lib --bins (2691 passed)
  • Release build produces 12 MiB binary

- set opt-level = "z" for size optimization
- set panic = "abort" to remove unwind tables
- remove unused dev-dependencies: tokio-stream (root), tempfile (zeph-scheduler)
@bug-ops bug-ops enabled auto-merge (squash) February 25, 2026 13:54
@bug-ops bug-ops merged commit b0f03b6 into main Feb 25, 2026
31 of 33 checks passed
@bug-ops bug-ops deleted the chore/reduce-binary-size branch February 25, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant