Skip to main content

gasm_host/
lib.rs

1//! Native host for [gasm](https://gasm.emdzej.pl) games.
2//!
3//! Load a guest `.wasm` with [`host::Game::load`], drive it with
4//! [`host::Game::frame`] at the guest's frame rate, and plug in the pieces you
5//! need: [`assets::Assets`] (memory, file-backed, folders), [`gfx::Gfx`] (wgpu:
6//! window, offscreen or null), [`audio::AudioOut`], [`net::Net`] (WebSocket,
7//! `ws://`/`wss://`), [`storage::Storage`] (per-game key/value).
8//!
9//! Complete runners built from these parts: [`headless::run`] (reproducible
10//! runs with hashes) and, with the `window` feature (default), `window::run`
11//! (winit window, cpal audio, gilrs gamepads, keyboard layouts). The `gasm-run`
12//! binary is their command line.
13//!
14//! ABI: <https://gasm.emdzej.pl/docs/abi> (machine-readable: `spec/abi.json`).
15
16pub mod angle;
17pub mod assets;
18pub mod audio;
19pub mod fetch;
20pub mod gfx;
21pub mod gl;
22pub mod gles;
23pub mod headless;
24pub mod host;
25pub mod keys;
26pub mod net;
27pub mod present;
28pub mod script;
29pub mod session;
30pub mod storage;
31pub mod switching;
32pub mod wasi;
33
34#[cfg(feature = "window")]
35pub mod keymap;
36#[cfg(feature = "window")]
37pub mod window;