Interface reference
One page per interface of host.wit, the contract a mod compiles against —
so a page here says what the running host actually offers, not what it
offered when someone last wrote about it.
Running the game
Section titled “Running the game”Command lineEvery flag the game takes, and what you must supply when you start it yourself rather than through the launcher.
server.tomlEvery key an instance's configuration file may carry.
The shared vocabulary
Section titled “The shared vocabulary”typesThe wire error, the id aliases, cause and context, and the field value set every interface builds on.
Imported — the host offers these, you call them
Section titled “Imported — the host offers these, you call them”eventWhat a hook may ask about the event it is handling: cause and instance token.
resolveNames become compact ids at init: signals, requests, sounds, components, fields, mods.
playerThe participant resource a server hook is lent: account, persona, session id, body.
logWrite to the host log, attributed and budgeted.
signalRaise a declared name to whoever subscribed; subscribe to hear future raises.
signal-toThe same raise, delivered to one participant's machine.
requestThe one awaited verb: ask your server half and receive its answer.
entitySpawn and despawn, control and release, component reads and writes, ids and lookup.
Component rowsEvery readable and writable component: fields, value kinds, defaults, per-row properties.
spatialRaycasts and shape intersection queries.
map-apiRead what the loaded map declares: its spawn points.
spawnThe host's placement of arrivals, turned on or off by the gamemode.
uiThe overlay line a client half can write.
audioPlay a declared sound on a bus the listener controls.
sessionWho is connected, and the display name the session states for each.
Exported — you implement these, the host calls them
Section titled “Exported — you implement these, the host calls them”server-apiThe server half: init, ticks, joins and leaves, interaction, contact, requests, signals.
client-apiThe client half: init, the client tick, subscribed signals, input edges.