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 net;
29pub mod present;
30pub mod script;
31pub mod session;
32pub mod splash;
33pub mod storage;
34pub mod switching;
35pub mod wasi;
36
37#[cfg(feature = "window")]
38pub mod keymap;
39#[cfg(feature = "window")]
40pub mod window;
41#[cfg(feature = "window")]
42pub mod prompt;