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 consent;
20pub mod fetch;
21pub mod files;
22pub mod gfx;
23pub mod gl;
24pub mod gles;
25pub mod headless;
26pub mod host;
27pub mod keys;
28pub mod manifest;
29pub mod net;
30pub mod present;
31pub mod script;
32pub mod session;
33pub mod splash;
34pub mod storage;
35pub mod switching;
36pub mod threads;
37pub mod wasi;
38
39#[cfg(feature = "window")]
40pub mod keymap;
41#[cfg(feature = "window")]
42pub mod window;
43#[cfg(feature = "window")]
44pub mod prompt;