Mod contract reference
The mod contract is a set of versioned WIT packages that a mod imports from and exports to the engine (mod contract, design (docs/superpowers/specs/2026-09-29-contract-foundation-design.md)). These pages are generated from it.
Contract 0.2.0, track 0.2: open, unreleased. Nothing on track 0.2 is released yet, so any item may still change in place (spec §7.2).
Machine-readable: contract.json (crates/manifold-wasm-abi/wit/contract.json) (format 1): every package, interface, function and type with its docs, track and consent class, and every payload’s shape. An index for tools and language models: llms.txt.
Packages
| Package | Version | Interfaces | About |
|---|---|---|---|
manifold:core | 0.2.0 | logging, ops, plugin-lifecycle, text, types | |
manifold:ecs | 0.2.0 | plugin-systems, resource-bundle | |
manifold:world | 0.2.0 | block-world | |
manifold:worlds | 0.2.0 | world host, world imports |
Reading the badges
- Kind.
import: the host defines it and a mod calls it.export: a mod implements it and the host calls it; an export’s functions are fixed within a track (spec §7.1).types-only: declares types; importing it links nothing. - Consent (spec §10.2), per interface; a function’s class is its interface’s.
silent: never prompted.listed: shown in the operator’s install view.operator: needs the operator’s explicit approval.player: also shown to each player at join. An interface imported only for a resource is silent. - Sides: where its functions work (
both,server,client); on the wrong side they return the interface’swrong-sideerror. - Owner: the program that specifies the interface and approves its changes (spec §4.4).
- Kernel profiles: the functions a kernel or hook instance may call (spec §10.6); every other import traps there.
- since X: stable since contract X. Items with no
sincebadge date from the package’s track opening (0.2.0 for track 0.2). - preview (
feature):@unstable, may change or disappear in any release, and needs the world’s opt-in (spec §8). - deprecated X: still linked until its track retires.
othercodes: values a function reports as its error’sother("<code>"), conditions added within a track that become cases at the next minor (spec §5.7).
Payloads and changes
- Payloads: what every
list<u8>carries. Schema payloads with their full postcard shape, packed layouts and opaque bytes. - Changelog: what each contract version added, from
@sinceand the released snapshots.
Legacy (0.1)
The contract 0.1 packages, linked by a mod’s [caps] until migration steps M2 and M3 move their interfaces into the packages above (spec §14). They have no consent class or owner in the contract table.
| Package | Version | Interfaces | About |
|---|---|---|---|
manifold:client | 0.1.0 | action, client-clock, client-state-read, draw, hud-catalog, hud-layout, hud-reskin | client-plugin WIT world — DISJOINT from manifold:game. |
manifold:game | 0.1.0 | asset-source, clock, persistent-storage, plugin, text, ui |
Internal
Interfaces for host tests, linked only with the contract-internal feature and refused for mods (spec §8.4).
| Package | Version | Interfaces | About |
|---|---|---|---|
manifold:internal | 0.2.0 | plugin-probe, probe, shapes | manifold:internal: interfaces for host tests (contract foundation spec §8.4). |
Regenerating
cargo run -p contract-describe rewrites contract.json and these pages; cargo test -p contract-describe fails when they are stale (MANIFOLD_REGEN_REFERENCE=1 rewrites them instead) and runs the breaking-change gate. See the contract description.