A Swift wasm WebGPU State Machine Engine

Check out our SwiftXState wasm WebGPU proof of concept

Direct link to WebGPU demo: SwiftXState/Examples/WasmGPUDemo at main · gistya/SwiftXState · GitHub

It's still very early stages for the library but it was pretty cool to see this being possible today. (Sadly could not get it working in Safari but it did work in Chrome).

4 Likes

We've upgraded the graphics significantly with MSDF text, zoom/rotate/pan, glow, shadows, SDF shapes.

This isn't just a one-shot demo, you can use it as the basis for extremely complex and performant state machines and use it to drive any logic in your wasm apps.

The demo we've provided also can be used as a template to learn WebGPU.

Note: you'll need Safari 26 or Google Chrome.

This link has the relevant files and a detailed README. We've included a localhost server and build script to get you going.

1 Like