Skip to content

Starshine

development @jtenner

A WebAssembly optimizer and transformation toolkit with validation, an owned function IR, analysis overlays, fuzzing, and host-facing interfaces.

Starshine

Starshine is a WebAssembly optimizer and transformation toolkit. It parses, validates, inspects, changes, and encodes WebAssembly modules.

Starshine is implemented in MoonBit. The implementation language is not the main point of the project. The main work is compiler architecture, optimizer correctness, and WebAssembly tooling.

Optimizer architecture

Starshine uses HotFunc as the owned representation for a function while optimization runs. Raw WebAssembly expressions stay at the decode, encode, validation, and debug boundaries.

Analysis data is derived from HotFunc. This includes:

These analyses are overlays. They can be rebuilt when a pass changes the function.

Correctness work

An optimizer must do more than produce valid WebAssembly. It must preserve program behavior.

Starshine uses several layers of checks:

This work is designed to catch changes that validate correctly but change what a program does.

Tooling

Starshine also includes:

Dewdrop uses Starshine as part of its WebAssembly GC compiler pipeline.

Starshine is under active development. More optimizer passes are moving onto the newer owned function IR and analysis model.