botstadia-interface 0.1.0

BotStadia's shared contracts: arena and agent WIT worlds, arena declarations, payloads, replay archives, metrics files and player messages.
Documentation

botstadia-interface

The contracts between BotStadia's pieces, in one crate.

Module What it is
declaration What an arena says about itself: inputs, outputs, bounds, no-action, control rate, budgets, wire sizes, stats, per-turn series and events. Declaration::problems lists anything incomplete.
payload The per-turn input and output encoding, and the one validity rule for an output: structure, finiteness and declared bounds. Nothing is clamped.
archive The replay archive: one session's frames, for the arena's player.
metrics The metrics file beside it: series, events, stats and the result, for the site.
copy An arena's arena.toml: its name and site copy.
player The messages between the site and an arena's player frame.

The WIT worlds are in wit/: botstadia:arena for arena engines and botstadia:agent for bots. Features generate bindings for them:

Feature For
arena-guest Arena engines (wasm32-wasip2), exported with export_arena!
agent-guest Bots (wasm32-wasip2), exported with export_agent!
host Anything that runs arenas and bots, on wasmtime
toml Reading and writing arena.toml

Developing

task check   # every target and feature set
task lint    # fmt + clippy -D warnings
task test

To build a consumer against a local checkout, add an untracked patch to that consumer (for example in its git-ignored .cargo/config.toml):

[patch.crates-io]
botstadia-interface = { path = "/path/to/botstadia-interface" }

Licence

MIT or Apache-2.0, at your choice.