import core from "grapheme/core" struct Release { service: String step: Float status: String } glyph Main { Rollout } query Rollout on Any -> Release { Release { service: "checkout", step: 0.0, status: "ramping" } |> Ramp } iterator Ramp on Release -> Release @core_default @loop(max: 10, merge: "replace") { match $state.status { case complete => return default => Advance } } mutation Advance on Release -> Release @core_default { inc_field(field: "step") |> if $state.step >= 3.0 then set { status: "complete" } else set { status: "ramping" } }
Press Run (or ⌘/Ctrl + Enter).
Compiled to a verified artifact, then executed, all inside Wasm.