Skip to content

wasm optimization pass in mops (build + bench)? #587

Description

@Kamirus

Optimization (ic-wasm optimize) isn't done by mops today — dfx did it silently via optimize: "cycles". On pocket-ic nothing optimizes, so bench numbers ≠ deployed numbers (sha256: ~163M raw vs ~134M optimized). Open question before any design.

Aspects to settle:

  • Scope: does mops produce the optimized deployable artifact, or just optimize for bench fidelity?
  • Consistency: build, bench, and deploy must optimize the same way; never diverge silently.
  • Ownership vs icp-cli recipe: recipe already does shrink/compress; avoid stacking/conflicting passes.
  • Config: flag vs mops.toml: config only justified if shared across commands.
  • ic-wasm versioning: pin it as a toolchain tool, matched to icp-cli?
  • Default: opt-in vs opt-out (changes everyone's numbers).
  • Visibility: applied level/tool/version must show in output.
  • Blocker: ic-wasm optimize fails on moc ≥1.10 (multivalue, no target_features section): needs moc fix or mops injecting the section.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions