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 gfx;
20pub mod gl;
21pub mod gles;
22pub mod headless;
23pub mod host;
24pub mod keys;
25pub mod net;
26pub mod present;
27pub mod script;
28pub mod session;
29pub mod storage;
30pub mod switching;
31pub mod wasi;
32
33#[cfg(feature = "window")]
34pub mod keymap;
35#[cfg(feature = "window")]
36pub mod window;