Expand description
A game running headless, for the operations that play it (run,
scene) and the MCP server’s session (crate::mcp): Session,
which any game gives as a Headless over its Harness.
The engine drives the session and reads it; the game says only how its
Harness starts and, if it has them, what its scene is
(Headless::with_scene), what happened in its rules
(Headless::with_events) and how its frame looks
(Headless::with_picture). The modules its game installed are read
from the game itself.
With perf on (Session::set_perf), a Headless measures each
frame with this machine’s clock and keeps its record, read with
Session::perf (ADR-0046). In a debug build of the tool program
each record has the heap’s counts too, from the program’s own heap
counter (shuyi_alloc_count::global), which counts the whole program,
and the game’s frames, spans and asset decodes are tagged in it
(shuyi_alloc_count::tags): Session::heap_snapshot takes what holds
the heap by tag. Start a session with measured_start to tag its
start, the game’s load, load.
Structs§
- Added
Sound - A sound the game made at run time
(
AudioQueue::add_sound) and hasn’t removed: its cue and the shape of its samples, never the samples. - Headless
- A
Sessionover a game’sHarness. - LogEntry
- A line of the game’s log.
- Module
Entry - A module installed in the game, with what it declared (ADR-0040).
- Scene
- The scene a stage shows, as text and as data.
- Session
Difference - The first frame of a session record that played differently.
- Session
Input - A session record to play, in place of a game’s start options.
- Session
Played - How far a session record played.
- Sound
- A sound cue asked to play.
Enums§
- Event
- Something that happened while a session ran, with its frame (frames count from 1).
Traits§
- Session
- A game running headless.
Functions§
- at_
pointer - The value at JSON Pointer
pointer(RFC 6901) indata; or, if it names nothing, why: the pointer, and the keys of the deepest object it reached. - measured_
start - A session started by
startwith perf on: in a build that counts the heap, what the start allocates (the game’s load) counts under theloadphase, and each asset decode under its kind, as in a game’s window. Use it where a session will be measured, so its snapshots say what the load holds.