gasm-sdk
Rust SDK for writing games for gasm, a portable
game runtime on WebAssembly. A game compiles to one .wasm file that runs in
the native runner (wasmtime + wgpu), in the browser (WebGPU), and headless in
CI, bit-identically.
[]
= ["cdylib"]
[]
= "0.1"
use Buttons;
game!;
What's in it:
- Core: logging, time, frame rate, launch params, RGBA video, audio, four virtual gamepads, assets.
gfx: a WebGPU subset with WGSL shaders and JSON descriptors.net: WebSocket-style messages.storage: per-game saves.- Native builds: on non-wasm targets the crate links an in-process stub
host (
gasm::native), so the same game builds natively for debugging and parity tests.
The crate is gasm-sdk; the library is named gasm, so code says use gasm::….
Guide: Writing games · ABI: spec.
The raw bindings (gasm::sys) are generated from spec/abi.json.
MIT licensed.