Skip to content

[Good First Issue] Add --strip and --lto flags for smaller binaries #3

@wangnaihe

Description

@wangnaihe

Module

w3cos-cli/src/main.rs

Description

Pass strip/LTO/codegen-units options to cargo build for smaller release binaries. Currently output is ~2.4MB, this could bring it down to ~1MB.

Acceptance Criteria

  • Add --strip CLI flag (or enable by default in --release)
  • Generate Cargo.toml profile with strip = true, lto = true, codegen-units = 1
  • Document the size reduction in output

Difficulty

Low

Relevant Files

  • crates/w3cos-cli/src/main.rs — CLI argument handling
  • crates/w3cos-compiler/src/codegen.rs — Cargo.toml generation (generate_cargo_toml)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions