PassthroughWasmOptimizer

The identity optimizer: returns bytes unchanged at every level — the OptLevel.O0 (passthrough) semantics.

A real seam for the paths that don't run a toolchain: the spike's fake-compiler flow and tests keep a genuine WasmOptimizer to call without dragging in Binaryen. Produces no speedup (the transform is a no-op) — real optimization is the :kuilt-warp-compiler WasmOptimizer impl.

Functions

Link copied to clipboard
open suspend override fun optimize(bytes: ByteArray, optLevel: OptLevel): ByteArray

Optimize bytes at optLevel, returning a distinct, still-runnable, ABI-preserving module. The result's content hash differs from the source (unless optLevel is a passthrough), making it a genuinely distinct, fetchable variant.