Skip to content

Extend rust-performance with build optimization depth (size-opt, feature gates, stripping) #66

@AlexMikhalev

Description

@AlexMikhalev

Parent Epic: #62

What

Deepen the build optimization coverage in rust-performance SKILL.md beyond the current release/release-lto profiles.

Sections to Add

  1. Size-Optimized Profiles -- opt-level = "z", panic = "abort", minimal binary builds
  2. Symbol Stripping -- strip = "symbols", strip = "debuginfo", when to use each
  3. Feature Gates -- Conditional compilation for optional features, reducing binary size
  4. no-std Alternatives -- When and how to use no-std crates for minimal binaries
  5. Cross-Compilation -- cross tool, target triples, distribution strategies

Source Reference

Section 11 (Build Optimization and Distribution) from RUST_SYSTEM_PROGRAMMING_BEST_PRACTICES.md

Disciplined Engineering Alignment

Phase Skill Build Optimization Relevance
Research disciplined-research Audit current binary size and build times; identify unnecessary dependencies; profile compilation
Design disciplined-design Specify target profiles per distribution (server vs WASM vs CLI); define feature gate strategy
Implementation disciplined-implementation Add profiles incrementally; each profile/feature gate = one step with size measurement
Verification disciplined-verification Verify all feature combinations compile; test stripped binaries; compare sizes before/after
Validation disciplined-validation Validate binaries work on target platforms; confirm WASM bundle size meets requirements

The SKILL.md should note:

  • During design: document profile selection rationale per deployment target
  • During verification: include binary size in benchmark report format

Acceptance Criteria

  • Build Profiles section extended with size-opt and cross-compilation examples
  • Feature gate patterns documented with examples
  • Cargo.toml profile examples updated
  • Disciplined workflow integration notes included

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions