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