rust-binary-size-reduction

Installation
SKILL.md

Shrink Rust Binary

Deterministic and idempotent Rust binary size reduction. Every change is measured, reversible, and explained. No change is applied blindly.

Principles

  • Measure first, change second. Every optimization is bracketed by a size measurement.
  • Idempotent. Running this skill twice produces the same result. Settings are set to exact values, not toggled.
  • Deterministic. No randomness, no heuristics that vary between runs. Same codebase = same output.
  • Correctness over size. Never break functionality. Flag behavioral changes explicitly.
  • Layered. Techniques are grouped into tiers: Safe (no behavior change), Behavioral (changes panic/debug behavior), Nightly (requires nightly toolchain), and Structural (code changes).

Step 0: Reconnaissance

Before changing anything, gather the full picture.

Installs
1
GitHub Stars
1
First Seen
Apr 22, 2026